日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

Ext2.2用戶名和密碼登錄表單的例子

系統 2055 0
這個表單也是我使用中的一個東西。感覺還不錯。

先看運行效果
Ext2.2用戶名和密碼登錄表單的例子

看代碼
  1. <!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. < html ? xmlns = "http://www.w3.org/1999/xhtml" >
  3. < head >
  4. < link ? rel = "stylesheet" ? type = "text/css" ? href = "resources/css/ext-all.css" />
  5. < script ? type = "text/javascript" ? src = "adapter/prototype/prototype.js" > </ script >
  6. < script ? type = "text/javascript" ? src = "adapter/prototype/scriptaculous.js?load=effects" > </ script >
  7. < script ? type = "text/javascript" ? src = "adapter/prototype/ext-prototype-adapter.js" > </ script >
  8. < script ? type = "text/javascript" ? src = "ext-all.js" > </ script >
  9. < style ? type = "text/css" >
  10. #LOGIN_FORM_LAYER?{
  11. ??position:relative;
  12. ??top:150px;
  13. ??width:?965px;
  14. ??height:?551px;
  15. }
  16. #loginDIV?{
  17. ??width:500px;
  18. ??position:relative;
  19. ??top:100px;
  20. }
  21. </ style >
  22. </ head >
  23. < body >
  24. < center >
  25. < script ? type = "text/javascript" >
  26. Ext.onReady(function(){
  27. ????Ext.QuickTips.init();
  28. ????//?turn?on?validation?errors?beside?the?field?globally
  29. ???? Ext.form.Field.prototype.msgTarget ?=? 'side' ;
  30. ????var? bd ?=? Ext .getBody();
  31. ????/*
  32. ?????*?================??Simple? form ??=======================
  33. ?????*/
  34. ????//bd.createChild({tag:?'h2',?html:?'Form?1?-?Very?Simple'});
  35. ????var? simple ?=? new ?Ext.FormPanel({
  36. ????????id:?'LOGIN_FORM',
  37. ????????labelWidth:?75,?//?label?settings?here?cascade?unless?overridden
  38. ????????url:'login.jsp',
  39. ????????frame:true,
  40. ????????title:?' < font ? size = 3 > 登錄系統 </ font > ',
  41. ????????bodyStyle:'padding:5px?5px?0',
  42. ????????width:?350,
  43. ????????defaults:?{width:?230},
  44. ????????defaultType:?'textfield',
  45. ????????ctCls:?'font-size:12px',
  46. ????????items:?[{
  47. ????????????????fieldLabel:?'用戶名',
  48. ????????????????name:?'username',
  49. ????????????????allowBlank:false
  50. ????????????},{
  51. ????????????????fieldLabel:?'密碼',
  52. ????????????????name:?'password',
  53. ????????????????inputType?:'password'
  54. ????????????},new?Ext.form.Hidden({
  55. ??????????????name:'referer',
  56. ??????????????value:'/index'
  57. ????????????})
  58. ????????],
  59. ????????buttons:?[{
  60. ????????????id:?'submitButton',
  61. ????????????type:?'submit',
  62. ????????????text:?'登錄',
  63. ????????????tooltip:?'點擊這個按鈕登錄系統',
  64. ????????????handler:?login
  65. ????????}]
  66. ????});
  67. ????simple.render("loginDIV");
  68. });
  69. function?login(){
  70. ??Ext.Ajax.request({
  71. ????url:?'/login',
  72. ????form:?'LOGIN_FORM',
  73. ????success:?function(t){
  74. ??????alert(t.responseText);
  75. ????}
  76. ??});
  77. }
  78. </ script >
  79. < div ? id = "LOGIN_FORM_LAYER" >
  80. < div ? id = "loginDIV" > </ div >
  81. </ div >
  82. </ center >
  83. </ body >
  84. </ html >

其中的/login處理登錄的代碼我就不寫了。大家自己做吧。

Ext2.2用戶名和密碼登錄表單的例子


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 东至县| 郎溪县| 郁南县| 苍溪县| 婺源县| 北宁市| 通许县| 新蔡县| 宜丰县| 哈尔滨市| 鄱阳县| 裕民县| 罗源县| 徐水县| 巴东县| 介休市| 县级市| 五河县| 陇川县| 通州区| 苍梧县| 泽普县| 泉州市| 巴中市| 方山县| 安庆市| 镶黄旗| 昌黎县| 双城市| 凌海市| 星座| 磐石市| 明溪县| 临夏市| 榆中县| 上林县| 河曲县| 噶尔县| 成都市| 内黄县| 峨山|