clone.html 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Clone DateBox - 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>Clone DateBox</h2>
  14. <p>Click the 'Clone' button to clone datebox components from the exiting datebox.</p>
  15. <div style="margin:20px 0;">
  16. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="cloneDatebox()">Clone</a>
  17. </div>
  18. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  19. <div style="margin-bottom:20px">
  20. <input id="dt" class="easyui-datebox" label="Select Date:" labelPosition="top" style="width:100%;">
  21. </div>
  22. <div id="cc" style="margin-top:10px"></div>
  23. </div>
  24. <script type="text/javascript">
  25. function cloneDatebox(){
  26. var dt = $('<input>').appendTo('#cc');
  27. dt.datebox('cloneFrom', '#dt');
  28. }
  29. </script>
  30. </body>
  31. </html>