interactive.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Interactive Messager - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Interactive Messager</h2>
  14. <p>Click on each button to display interactive message box.</p>
  15. <div style="margin:20px 0;">
  16. <a href="#" class="easyui-linkbutton" onclick="confirm1();">Confirm</a>
  17. <a href="#" class="easyui-linkbutton" onclick="prompt1()">Prompt</a>
  18. </div>
  19. <script>
  20. function confirm1(){
  21. $.messager.confirm('My Title', 'Are you confirm this?', function(r){
  22. if (r){
  23. alert('confirmed: '+r);
  24. }
  25. });
  26. }
  27. function prompt1(){
  28. $.messager.prompt('My Title', 'Please type something', function(r){
  29. if (r){
  30. alert('you type: '+r);
  31. }
  32. });
  33. }
  34. </script>
  35. </body>
  36. </html>