弹出一个带有超链接和图片的对话框--JqueryUI Dialog

实现

效果图
弹出一个带有超链接和图片的对话框--JqueryUI Dialog
代码

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>对话框部件(Dialog Widget)演示</title>
  <link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
  <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
</head>
<body>
 
<button id="opener">打开对话框</button>
<div id="dialog" title="dialog" style="">
	<a href="https://www.baidu.com/">百度</a>
</div>
 
<script>
//$('#divId').dialog({title:'修改'}).dialog('open');
$( "#dialog" ).dialog({ autoOpen: false });
$( "#opener" ).click(function() {
	
  $( "#dialog" ).dialog( "open" );
	
});
</script>
 
</body>
</html>

修改dialog

$( "#dialog" ).dialog({title:"改标题"});

弹出一个带有超链接和图片的对话框--JqueryUI Dialog

<button id="opener">打开对话框</button>
<div id="dialog" title="dialog" width="600px">
	<p>
		<div style="position:absolute;background:yellow;width:300px;height:300px;top:0;left:0">
			<a href="https://www.baidu.com/">百度</a>
		</div>
		<div style="position:absolute;background:blue;width:300px;height:300px;top:0;left:320px">
		</div>
	</p>
	
</div>
 
<script>
//$('#divId').dialog({title:'修改'}).dialog('open');
$( "#dialog" ).dialog({autoOpen: false,});
$( "#opener" ).click(function() {
	$( "#dialog" ).dialog({
	width:"620",
	height:"300",
	buttons : [ {
		text : "确定",
		click : function() {	
			$( "#dialog" ).dialog( "close" );
		}
	} ],		
	});
  $( "#dialog" ).dialog( "open" );
	
});
</script>

看完发现还是layui香,再见

上一篇:Dialog 按照顺序弹窗


下一篇:用PYQT5写一个登陆界面