dialog.html 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Dialog Examples</title>
  6. <link rel="stylesheet" href="../themes/default/default.css" />
  7. <script src="../kindeditor.js"></script>
  8. <script>
  9. KindEditor.ready(function(K) {
  10. K('#create1').click(function() {
  11. var dialog = K.dialog({
  12. width : 500,
  13. title : '测试窗口',
  14. body : '<div style="margin:10px;"><strong>内容</strong></div>',
  15. closeBtn : {
  16. name : '关闭',
  17. click : function(e) {
  18. dialog.remove();
  19. }
  20. },
  21. yesBtn : {
  22. name : '确定',
  23. click : function(e) {
  24. alert(this.value);
  25. }
  26. },
  27. noBtn : {
  28. name : '取消',
  29. click : function(e) {
  30. dialog.remove();
  31. }
  32. }
  33. });
  34. });
  35. });
  36. </script>
  37. </head>
  38. <body>
  39. <input type="button" id="create1" value="打开弹出框" />
  40. </body>
  41. </html>