basic.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Basic Form - 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>Basic Form</h2>
  14. <p>Fill the form and submit it.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div class="easyui-panel" title="New Topic" style="width:100%;max-width:400px;padding:30px 60px;">
  17. <form id="ff" method="post">
  18. <div style="margin-bottom:20px">
  19. <input class="easyui-textbox" name="name" style="width:100%" data-options="label:'Name:',required:true">
  20. </div>
  21. <div style="margin-bottom:20px">
  22. <input class="easyui-textbox" name="email" style="width:100%" data-options="label:'Email:',required:true,validType:'email'">
  23. </div>
  24. <div style="margin-bottom:20px">
  25. <input class="easyui-textbox" name="subject" style="width:100%" data-options="label:'Subject:',required:true">
  26. </div>
  27. <div style="margin-bottom:20px">
  28. <input class="easyui-textbox" name="message" style="width:100%;height:60px" data-options="label:'Message:',multiline:true">
  29. </div>
  30. <div style="margin-bottom:20px">
  31. <select class="easyui-combobox" name="language" label="Language" style="width:100%"><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
  32. </div>
  33. </form>
  34. <div style="text-align:center;padding:5px 0">
  35. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">Submit</a>
  36. <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">Clear</a>
  37. </div>
  38. </div>
  39. <script>
  40. function submitForm(){
  41. $('#ff').form('submit');
  42. }
  43. function clearForm(){
  44. $('#ff').form('clear');
  45. }
  46. </script>
  47. </body>
  48. </html>