<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    沉睡森林@漂在北京

    本處文章除注明“轉(zhuǎn)載”外均為原創(chuàng),轉(zhuǎn)載請注明出處。

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      152 隨筆 :: 4 文章 :: 114 評論 :: 0 Trackbacks

    在對extform進(jìn)行布局處理后,發(fā)現(xiàn)不能提交textfield的值到服務(wù)器上面。代碼只能提交params里面的一個(gè)參數(shù),其他的field不能提交。下面的代碼是布局后的代碼:

    <html>

    <head>

    <link rel="stylesheet" type="text/css" href="http://127.0.0.1:8080/greatwall/script/ext/resources/css/ext-all.css" />

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-base.js"></script>

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-all.js"></script>

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-lang-zh_CN.js"></script>

    <title>Example of Form Demo</title>

    </head>

    <script>

    function func_submit_click(){

        testForm.form.doAction("submit",{

           method:'post',

           url : 'http://127.0.0.1:8080/greatwall/txn990051.do',

           success:function(form,action){ 

               Ext.Msg.alert('add', 'success22222222222');

           },

           failure:function(form,action){

               Ext.Msg.alert('add', 'success2222222222222222222222222');

           },

           params : { action : 'submit', qq : '233298765' }

        });   

    }

    </script>

    <body>

    <script>

    var testForm = null;

    Ext.BLANK_IMAGE_URL = 'http://127.0.0.1:8080/greatwall/script/ext/resources/images/default/s.gif';

    var _bodyWidth = Ext.getBody().getWidth()-12;

    Ext.onReady(function(){

        Ext.QuickTips.init();

        Ext.form.Field.prototype.msgTarget = 'qtip';

        testForm = new Ext.FormPanel({name:'testForm',id:'testForm',layout:'table',style:'height:100%',width:_bodyWidth+12,layoutConfig: {columns:4},defaults:{border:false,layout:'form',frame:false,labelAlign:'right',labelWidth:75,width:_bodyWidth/2,height:30}, method:'post',src:'txn990042.do',title:'testForm',frame:true});

        testForm.addButton({text:'submit',name:'button_submit',handler:func_submit_click});

        testForm.add({colspan:2,width:_bodyWidth/2.0,items:{xtype:'textfield',fieldLabel:'username',name:'username',anchor:'100%'}});

        testForm.add({colspan:2,width:_bodyWidth/2.0,items:{xtype:'textfield',fieldLabel:'email',name:'email',anchor:'100%'}});

        testForm.add({colspan:2,width:_bodyWidth/2.0,items:{xtype:'textfield',fieldLabel:'qq',name:'qq',anchor:'100%'}});

        testForm.add({colspan:2,width:_bodyWidth/2.0,items:{xtype:'textfield',fieldLabel:'msn',name:'msn',anchor:'100%'}});

        testForm.render(Ext.getBody());

    });

    </script>

    </body>

    </html>

     

        而使用下面的代碼是可以提交到服務(wù)器上面的:

    <html>

    <head>

    <link rel="stylesheet" type="text/css" href="http://127.0.0.1:8080/greatwall/script/ext/resources/css/ext-all.css" />

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-base.js"></script>

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-all.js"></script>

    <script type="text/javascript" src="http://127.0.0.1:8080/greatwall/script/ext/ext-lang-zh_CN.js"></script>

    <title>Example of Form Demo</title>

    </head>

    <script>

    function func_submit(){

        testForm.form.doAction("submit",{

           method:'post',

           url : 'http://127.0.0.1:8080/greatwall/txn990051.do',

           success:function(form,action){ 

               Ext.Msg.alert('add', 'success22222222222');

           },

           failure:function(form,action){

               Ext.Msg.alert('add', 'success2222222222222222222222222');

           },

           params : { action : 'submit', qq : '233298765' }

        });   

    }

    </script>

    <body>

    <script>

    var testForm = null;

    Ext.BLANK_IMAGE_URL = 'http://127.0.0.1:8080/greatwall/script/ext/resources/images/default/s.gif';

    var _bodyWidth = Ext.getBody().getWidth()-12;

    Ext.onReady(function(){

        Ext.QuickTips.init();

        Ext.form.Field.prototype.msgTarget = 'qtip';

        testForm = new Ext.FormPanel({

           name:'testForm',

           id:'testForm',

           style:'height:100%',

           title:'testForm',

           frame:true

        });

        testForm.add({fieldLabel:'username',name:'username',xtype:'textfield'});

        testForm.add({fieldLabel:'email',name:'email',xtype:'textfield'});

        testForm.add({fieldLabel:'msn',name:'msn',xtype:'textfield'});

        testForm.addButton({text:'submit',handler:func_submit});

        testForm.render(Ext.getBody());

    });

    </script>

    </body>

    </html>

     

        對于表單肯定是需要進(jìn)行布局處理的,數(shù)據(jù)提交肯定是可以滿足的,但是對于ext來說,怎么樣才算是創(chuàng)建了一個(gè)html的表單?是FormPanel還是layoutform的?感覺第一段代碼是不是添加了多個(gè)form在一個(gè)大的form里面了,到底ext是怎么處理的,還需要研究研究。

     

    posted on 2008-11-13 17:22 王總兵 閱讀(631) 評論(0)  編輯  收藏 所屬分類: Ext
    主站蜘蛛池模板: 国产亚洲精品国产| 久久亚洲国产欧洲精品一| 成人无遮挡裸免费视频在线观看| 亚洲AV综合色区无码一二三区| 怡红院亚洲怡红院首页| 国产国拍亚洲精品福利| 亚洲色偷偷综合亚洲AVYP| 精品亚洲永久免费精品| 亚洲欧洲日韩不卡| 亚洲精品亚洲人成在线观看麻豆| 亚洲精品人成电影网| 日韩亚洲不卡在线视频中文字幕在线观看| 亚洲熟妇av一区二区三区| 亚洲精品无码久久一线| 久久精品国产亚洲av日韩| 超清首页国产亚洲丝袜| 亚洲春色在线视频| 亚洲精品国产免费| 精品亚洲AV无码一区二区三区| 色婷五月综激情亚洲综合| 亚洲国产一区二区三区在线观看| 国产精品亚洲专区在线播放| 国产A∨免费精品视频| a国产成人免费视频| 亚洲国产精品免费在线观看| 日韩大片免费观看视频播放 | 在线免费中文字幕| 免费A级毛片无码A∨免费| 国内免费高清在线观看| 国产成人在线观看免费网站| 中文字幕精品无码亚洲字| 久久精品国产亚洲AV网站| 亚洲国产成+人+综合| 亚洲精品无码久久久久YW| 一级视频免费观看| 毛片无码免费无码播放 | 三上悠亚电影全集免费| 日韩久久无码免费毛片软件| 国产色爽免费无码视频| 国产在线国偷精品产拍免费| 国产成人毛片亚洲精品|