alert.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. <div class="demo-info">
  15. <div class="demo-tip icon-tip"></div>
  16. <div>Click on each button to display different alert message box.</div>
  17. </div>
  18. <div style="margin:10px 0;">
  19. <a href="#" class="easyui-linkbutton" onclick="alert1()">Alert</a>
  20. <a href="#" class="easyui-linkbutton" onclick="alert2()">Error</a>
  21. <a href="#" class="easyui-linkbutton" onclick="alert3()">Info</a>
  22. <a href="#" class="easyui-linkbutton" onclick="alert4()">Question</a>
  23. <a href="#" class="easyui-linkbutton" onclick="alert5()">Warning</a>
  24. </div>
  25. <script>
  26. function alert1(){
  27. $.messager.alert('My Title','Here is a message!');
  28. }
  29. function alert2(){
  30. $.messager.alert('My Title','Here is a error message!','error');
  31. }
  32. function alert3(){
  33. $.messager.alert('My Title','Here is a info message!','info');
  34. }
  35. function alert4(){
  36. $.messager.alert('My Title','Here is a question message!','question');
  37. }
  38. function alert5(){
  39. $.messager.alert('My Title','Here is a warning message!','warning');
  40. }
  41. </script>
  42. </body>
  43. </html>