buttons.html 971 B

12345678910111213141516171819202122232425262728
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>DateBox Buttons - 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>DateBox Buttons</h2>
  14. <p>This example shows how to customize the datebox buttons underneath the calendar.</p>
  15. <div style="margin:20px 0;"></div>
  16. <input class="easyui-datebox"></input>
  17. <input class="easyui-datebox" data-options="buttons:buttons"></input>
  18. <script>
  19. var buttons = $.extend([], $.fn.datebox.defaults.buttons);
  20. buttons.splice(1, 0, {
  21. text: 'MyBtn',
  22. handler: function(target){
  23. alert('click MyBtn');
  24. }
  25. });
  26. </script>
  27. </body>
  28. </html>