本文介绍了单击按钮时如何显示自定义对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望我的自定义对话框在单击按钮时加载,但那没有发生.我正在使用此网页上的对话框.
I want my custom dialog box to load on button click but that's not happening.I am using the dialog box on this webpage.
jqueryui/dialog/#default
这是我的代码.
function click(){ $(function() { $( "#dialog" ).dialog({ width : 250, height: 180, modal : true }); }); } <div> <button type="button" id="put" onclick="click()">Insert data</button> </div>以上代码无效..请帮助...
The above code is not working..Please help...
推荐答案有校对链接 HTML:
It works fine there is prooflink HTML:
<div id="dialog"> <p>THIS IS DIALOG!!!</p> </div> <button id="opener">Open Dialog</button>还有Jquery:
$(function() { $( "#dialog" ).dialog({ autoOpen: false }); $( "#opener" ).click(function() { $( "#dialog" ).dialog( "open" ); }); });更多推荐
单击按钮时如何显示自定义对话框
发布评论