jq弹框

<!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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值