<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="../res/static/js/jquery-1.11.3.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#dialog" ).dialog({
autoOpen: false, // 是否自动弹出窗口
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
},
modal : true, // 设置为模态对话框
resizable : true,
// width : '308px', //弹出框宽度
// height : '190px', //弹出框高度
title : "提示", //弹出框标题
// position : "center", //窗口显示的位置
buttons:{
'确定':function(){
//调用登录的方法
console.log('这里调用接口')
// $(this).dialog("close");
},
'取消':function(){
$(this).dialog("close");
}
}
});
$( "#opener" ).on( "click", function() {
$( "#dialog" ).dialog( "open" );
});
} );
</script>
</head>
<body>
<div id="dialog">
<p>是否合成矿机?</p>
</div>
<button id="opener">Open Dialog</button>
</body>
</html>
jq弹框
最新推荐文章于 2023-03-05 00:29:20 发布