弹出层,关闭可以返回值
XML/HTML Code
- <div id="example">
- <button id="open-dialog">open dialog</button>
- <div id="answer"></div>
- </div>
- <script type="text/javascript">
- $('#open-dialog').click(function() {
- var header = 'Your question header';
- var message = 'The compleet discription of the question.';
- var options = { okButton: 'Yes', okClass: 'save', cancelButton: 'No', cancelClass: 'alert'};
- showQuestionDialog(header, message, options, function(reaction) {
- $('#answer').text(reaction);
- });
- });
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_482.html