当前位置:编程学习 > C#/ASP.NET >>

大家看看这段代码,!

function getSubject() 

    var xmlDoc; 

    if(window.ActiveXObject) 
    { 
        //获得操作的xml文件的对象 
        xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); 
        xmlDoc.async = false; 
        xmlDoc.load("111.xml");
        if(xmlDoc == null) 
            { 
                alert('您的浏览器不支持xml文件读取,于是本页面禁止您的操作,推荐使用IE5.0以上可以解决此问题!'); 
                window.location.href='/Index.aspx'; 
                return; 
            } 
    }
    //解析xml文件,判断是否出错 
    if(xmlDoc.parseError.errorCode != 0) 
    { 
        alert(xmlDoc.parseError.reason); 
        return; 
    } 
    //获得根接点 
    var nodes = xmlDoc.documentElement.childNodes; 
    //得到根接点下共有子接点个数,并循环 
    return nodes;
    }
Ext.onReady(function(){
    Ext.QuickTips.init();  
    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';

    var InformationForm=new Ext.form.FormPanel({   
    buttonAlign:'center',   
    labelAlign:'left',   
    labelWidth:40,
    title: '题目',   
    frame:true, 
    autoScroll:true,  
    bodyStyle:'padding:0px 0px 0 0;',
    width: 500,
  items:[ 
          new Ext.Panel({
                      id:'ergwedfww221',
                      html:'描述dddd毛书'
                      }),
          var nodes=getSubject();
          for(var i=0;i<10;i++)
          { 
          new Ext.Panel({
                      id:'ergwedf221',
                      items:[
                              new Ext.Panel({
                              id:'ergwedf1',
                                html:'<h1>问卷题目</h1>'          
                              }),     
                                new Ext.Panel({
                                id:'questionChoice',
                                items: [               
                                            new Ext.form.Radio({             
                                            id:'dd1',
                                            name:'a',
                                            boxLabel:'111ew1'
                                            }),      
                                            new Ext.form.Radio({
                                            boxLabel:'11qwe1',
                                            name:'a',
                                            id:'11'
                                            })
                                       ]
                                })
                              ]
                           })
             }
         ]   
    });  
    InformationForm.render(document.body);   
});

我想动态的创建radio
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,