alert.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Alert 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>Alert Messager</h2>
  14. <p>Click on each button to display different alert message box.</p>
  15. <div style="margin:20px 0;">
  16. <a href="#" class="easyui-linkbutton" onclick="alert1()">Alert</a>
  17. <a href="#" class="easyui-linkbutton" onclick="alert2()">Error</a>
  18. <a href="#" class="easyui-linkbutton" onclick="alert3()">Info</a>
  19. <a href="#" class="easyui-linkbutton" onclick="alert4()">Question</a>
  20. <a href="#" class="easyui-linkbutton" onclick="alert5()">Warning</a>
  21. </div>
  22. <script>
  23. function alert1(){
  24. $.messager.alert('My Title','Here is a message!');
  25. }
  26. function alert2(){
  27. $.messager.alert('My Title','Here is a error message!','error');
  28. }
  29. function alert3(){
  30. $.messager.alert('My Title','Here is a info message!','info');
  31. }
  32. function alert4(){
  33. $.messager.alert('My Title','Here is a question message!','question');
  34. }
  35. function alert5(){
  36. $.messager.alert('My Title','Here is a warning message!','warning');
  37. }
  38. </script>
  39. </body>
  40. </html>