js弹框 <button id="tantantan">带按钮弹窗</button> <script type="text/javascript"> //带按钮弹窗 $("#tantantan").click(function() { var d = dialog({ let content_html ="", width: 260, title: '提示', content: content_html, okValue: '确定', ok: function() { // do something }, cancelValue: '取消', cancel: function() { // do something }, onshow: function() { // do something }, }); d.show(); }); </script> Dialog showModal() 方法 <dialog id="myDialog">这是一个对话窗口</dialog> <script> function myFunction() { document.getElementById("myDialog").showModal(); } </script>