小部件对话框函数可与JqueryUI中的小部件一起使用。对话框是在HTML页面上显示信息的一种不错的方法。对话框是一个带有标题和内容区域的浮动窗口。此窗口可以移动,调整大小,并且默认情况下可以使用" X"图标关闭。
Dialog - 语法
$( "#dialog" ).dialog();
Dialog - 示例
以下是显示Dialog用法的简单示例-
<!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 displayinginformation. The dialog window can be moved, resized and closed withthe x icon.</p></div></body> </html>
这将产生以下输出-
jQuery 中的 Dialog组件函数 - 无涯教程网无涯教程网提供小部件对话框函数可与JqueryUI中的小部件一起使用。对话框是在HTML页面上显示信息的一...https://www.learnfk.com/jquery/widget-dialog.html