jQuery 中的 Dialog组件函数

首页 / jQuery入门教程 / jQuery 中的 Dialog组件函数

小部件对话框函数可与JqueryUI中的小部件一起使用。对话框是在HTML页面上显示信息的一种不错的方法。对话框是一个带有标题和内容区域的浮动窗口。此窗口可以移动,调整大小,并且默认情况下可以使用" X"图标关闭。

Dialog - 语法

$( "#dialog" ).dialog();

Dialog - 示例

以下是显示Dialog用法的简单示例-

链接:https://www.learnfk.comhttps://www.learnfk.com/jquery/widget-dialog.html

来源:LearnFk无涯教程网

<!doctype html>
<html lang="en">
   <head>
      <meta charset="utf-8">
      <title>jQuery UI Dialog - Default functionality</title>
		
      <link rel="stylesheet" 
         href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
			
      <script type="text/javascript" 
         src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
      </script>
			
      <script type="text/javascript" 
         src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js">
      </script>
  
      <script>
         $(function() {
            $( "#dialog" ).dialog();
         });
      </script>
   </head>
	
   <body>
      <div id="dialog" title="Basic dialog">
         <p>This is the default dialog which is useful for displaying
            information. The dialog window can be moved, resized and closed with
            the 'x' icon.</p>
      </div>
 
   </body>
</html>

这将产生以下输出-

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

邱岳的产品手记 -〔邱岳〕

零基础学Python -〔尹会生〕

程序员的数学基础课 -〔黄申〕

雷蓓蓓的项目管理实战课 -〔雷蓓蓓〕

如何看懂一幅画 -〔罗桂霞〕

技术管理案例课 -〔许健〕

高楼的性能工程实战课 -〔高楼〕

如何讲好一堂课 -〔薛雨〕

云计算的必修小课 -〔吕蕴偲〕

好记忆不如烂笔头。留下您的足迹吧 :)