EXT--layout的用法总结

本文深入解析了Ext JS 中的九种布局方式:绝对定位、锚点、边框、抽屉式、卡片、表单、表格、列、填充布局,通过实例展示了每种布局的特点和用法。

开发者博客www.developsearch.com

 

layout中有absolute,anchor,border,accordion,card,form,table,column,fit这几种,现一一举例: 
1.absolute根据字面意思就知道,是根据具体坐标进行定位的,固不写相应的代码了,其他的如下 
2.anchor:其值可以使百分比和数值,数值一般为负数,其代表的意思是如果宽度和长度中有一个设定值了,则anchor代表的是未设置的那个,如果两者都没有设定具体值,则如果需要使用anchor则需要anchro:'ww,hh'

Ext.onReady(function() {  
       Ext.create('Ext.Window',{
		title:'Anchor layout',
		width:400,
		height:400,
		layout:'anchor',
		plain: true,
		items:[
			Ext.create('Ext.panel.Panel',{
				title:'panel1',
				height:100,
				anchor:'-50',
				html:'高度等于100,宽度= 容器宽度-50'
			}),
			Ext.create('Ext.panel.Panel',{
				title:'panel2',
				height:100,
				anchor:'50%',
				html:'高度等于100,宽度=容器的宽度*50%'
			}),
			Ext.create('Ext.panel.Panel',{
				title:'panel3',
				anchor:'-10,-200',
				html:'高度等于容器高度-10,宽度等于容器宽度-200'
			})
		]
		
	}).show(); 
    }); 

 

 

3.border:将容器分为五个区域:east,south,west,north,center

 

 

 

Ext.onReady(function(){
         var tab = Ext.create('Ext.tab.Panel',{
		region:'center',//border布局,将页面分成东,南,西,北,中五部分,这里表示TabPanel放在中间  
		margins:'3,3,3,0',
		activeTab:0,
		defaults:{
			autoScroll:true
		},
		items:[{
			title:'tab1',
			html:'第一个tab内容'
		},{
			title:'tab2',
			html:'第二个tab内容'
		},{
			title:'tab3',
			html:'第三个tab内容'
		}]
		
	})
	var nav = Ext.create('Ext.panel.Panel',{
		title:'navigation',
		region:'west',
		split:true,
		width:200,
		collapsible:true,//允许伸缩
		margins:'3,0,3,3',
		cmargins:'3,3,3,'
	});
	Ext.create('Ext.Window',{
		title:'Layout Window',
		width:600,
		height:350,
		closable:true,
		border:false,
		plain:true,
		layout:'border',
		closeAction:'hide',
		items:[nav,tab]
	}).show();
)};

 

 

4.accordion:这个风格是手风琴式的,效果是如果 有多个item,则点击其中一个,则展开,其他的则收缩。

Ext.OnReady(function(){  
     Ext.create('Ext.panel.Panel',{
		title:'容器组件',
		layout:'accordion',
		width:600,
		height:200,
		layoutConfig:{animate:false},
		items:[{
		   title:'元素1',html:''
		},{
		   title:'元素2',html:''
		},{
		   title:'元素3',html:''
		},{
		   title:'元素4',html:''
		}]
		
	}); 
}); 

 

 

5.card:像安装向导一样,一张一张显示

 

Ext.onReady(function(){
	var navigate = function(panel,direction){
		var layout = panel.getLayout();
		layout[direction]();
		Ext.getCmp('move-prev').setDisabled(!layout.getPrev());
		Ext.getCmp('move-next').setDisabled(!layout.getNext());
	};
	Ext.create('Ext.panel.Panel',{
				title:'Example Wizard',
				height:500,
				width:400,
				layout: 'card',
				activeItem:0,
				bodyStyle:'padding:15px',
				animCollapse:true,
				renderTo:Ext.getBody(),
				defaults:{
       				 // applied to each contained panel
        			border: false
   				},
				bbar:[{
					id:'move-prev',
					text:'back',
					handler:function(btn){
						navigate(btn.up("panel"),"prev");
					},
					disabled:true
				},'->',{
					id:'move-next',
					text:"next",
					handler:function(btn){
						navigate(btn.up("panel"),"next");
					}
				}],
				items:[{
					id:'card-0',
					html:'<h1>Welcome to the Wizard!</h1>'
				},{
					id:'card-1',
					html:'<p>step 2 of 3 </p>'
				},{
					id:'card-2',
					html:'<h1>Congratulations!</h1><p>Step 3 of  3-complete</p>'
				}]
			});
});

 

 

6.form:是一种专门用于管理表单中输入字段的布局

Ext.onReady(function() {  
        var win = Ext.create('Ext.Window',{  
            title: "form Layout",  
            height: 150,  
            width: 230,  
            plain: true,  
            bodyStyle: 'padding:15px',  
            items:   
            {  
                xtype: "form",  
                labelWidth: 30,  
                defaultType: "textfield",  
                frame:true,  
                items:   
                [  
                    {  
                        fieldLabel:"姓名",  
                        name:"username",  
                        allowBlank:false  
                    },  
                    {  
                        fieldLabel:"呢称",  
                        name:"nickname"  
                    },  
                    {  
                        fieldLabel: "生日",  
                        xtype:'datefield',  
                        name: "birthday",  
                        width:127  
                    }  
                ]  
            }  
        });  
        win.show();  
    });  

 

7.table:按照普通表格的方法布局子元素,用layoutConfig:{columns:3},//将父容器分成3列

Ext.onReady(function(){  
      Ext.create('Ext.panel.Panel',  
      {  
       renderTo:Ext.getBody(),  
       title:'容器组件',  
       layout:'table',         
       width:500,  
       height:200,  
       layoutConfig:{columns:3},//将父容器分成3列  
       items:[  
        {title:'元素1',html:'ssssssssss',rowspan:2,height:100},  
        {title:'元素2',html:'dfffsddsdfsdf',colspan:2},  
        {title:'元素3',html:'sdfsdfsdf'},  
        {title:'元素4',html:''}  
       ]  
      }  
     );  
}); 

 

8.column:把整个容器看成一列,然后向容器放入子元素时

Ext.onReady(function() {  
        var win = Ext.create('Ext.Window',{  
            title: "Column Layout",  
            height: 300,  
            width: 400,  
            plain: true,  
            layout: 'column',  
            items: [{  
                title:"width=50%",  
                columnWidth:0.5,  
                html:"width=(容器宽度-容器内其它组件固定宽度)*50%",  
                height:200  
            },  
            {  
                title:"width=250px",  
                width: 200,  
                height:100,  
                html:"固定宽度为250px"  
            }              
            ]  
        });  
        win.show();  
    });  

 

9.fit:填充整个容器(如果多个子元素则只有一个元素充满整个容器)

Ext.OnReady(function(){  
   Ext.create(Ext.create(Ext.panel.Panel',  
      {  
       renderTo:'paneldiv',  
       title:'容器组件',  
       layout:'fit',  
       width:500,  
       height:100,  
       items:[  
        {title:'子元素1'},  
        {title:'子元素2'},  
        {title:'子元素3'},  
        {title:'子元素4'},  
        {title:'子元素5'}  
       ]  
      }  
     );  
}); 

 开发者博客www.developsearch.com

 

<div class="x-column-inner" id="ext-gen100" style="width: 787px;"><div id="ext-comp-1053" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 259px;"><div class="x-panel-bwrap" id="ext-gen102"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen103" style="width: 259px;"><div class="x-form-item " tabindex="-1" id="ext-gen117"><label for="ext-comp-1054" style="width:115px;" class="x-form-item-label" id="ext-gen118">ECO编号:</label><div class="x-form-element" id="x-form-el-ext-comp-1054" style="padding-left:120px"><input type="text" size="20" autocomplete="off" id="ext-comp-1054" name="file.fileNumber" class="x-form-text x-form-readonly x-form-field" readonly="" style="width: 126px;"></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen119"><label for="fileStatus" style="width:115px;" class="x-form-item-label" id="ext-gen120">ECO状态:</label><div class="x-form-element" id="x-form-el-fileStatus" style="padding-left:120px"><input type="text" size="20" autocomplete="off" id="fileStatus" name="fileStatus" class="x-form-text x-form-readonly x-form-field" readonly="" style="width: 126px;"></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen121"><label for="ext-comp-1055" style="width:115px;" class="x-form-item-label" id="ext-gen122">申请人电话<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1055" style="padding-left:120px"><input type="text" size="20" autocomplete="off" id="ext-comp-1055" name="file.requesterNumber" class="x-form-text x-form-field x-form-readonly" style="width: 126px;" readonly=""></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen123"><label for="ext-comp-1056" style="width:115px;" class="x-form-item-label" id="ext-gen124"><font color="blue" style="background:yellow;">是否研发设计责任</font><font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1056" style="padding-left:120px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen125" style="width: 126px;"><input type="hidden" name="file.isRdResp" id="ext-gen127" value="否"><input type="text" size="24" autocomplete="off" id="ext-comp-1056" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 126px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen126" style="display: none;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen128"><label for="ext-comp-1057" style="width:115px;" class="x-form-item-label" id="ext-gen129">更改阶段<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1057" style="padding-left:120px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen130" style="width: 126px;"><input type="hidden" name="file.changeStage" id="ext-gen132" value="设计"><input type="text" size="24" autocomplete="off" id="ext-comp-1057" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 126px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen131" style="display: none;"></div></div><div class="x-form-clear-left"></div></div></div></div></div><div id="ext-comp-1058" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 259px;"><div class="x-panel-bwrap" id="ext-gen105"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen106" style="width: 259px;"><div class="x-form-item " tabindex="-1" id="ext-gen133"><label for="ext-gen11" style="width:110px;" class="x-form-item-label" id="ext-gen134">申请人<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-gen11" style="padding-left:115px"><div class="x-form-field-wrap x-form-file-wrap" id="ext-gen135" style="width: 131px;"><input type="text" size="20" autocomplete="off" id="ext-gen11" class="x-form-text x-form-readonly x-form-field x-form-file-text" readonly="" style="width: 96px;"><table id="ext-comp-1180" cellspacing="0" class="x-btn x-form-file-btn x-btn-noicon x-item-disabled" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr><tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="" unselectable="on"><button type="button" id="ext-gen136" class=" x-btn-text">选择</button></em></td><td class="x-btn-mr"><i> </i></td></tr><tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr></tbody></table><input type="hidden" size="20" autocomplete="off" id="ext-comp-1181" name="file.requestMemberId" class=" x-form-hidden x-form-field" value="15388"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen137"><label for="implementDate" style="width:110px;" class="x-form-item-label" id="ext-gen138">实施日期:</label><div class="x-form-element" id="x-form-el-implementDate" style="padding-left:115px"><input type="text" size="20" autocomplete="off" id="implementDate" name="implementDate" class="x-form-text x-form-readonly x-form-field" readonly="" style="width: 131px;"></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen139"><label for="hasOther" style="width:110px;" class="x-form-item-label" id="ext-gen140">多人合作ECO<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-hasOther" style="padding-left:115px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen141" style="width: 131px;"><input type="hidden" name="file.hasOther" id="ext-gen143" value="是"><input type="text" size="24" autocomplete="off" id="hasOther" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 131px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen142" style="display: none;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item" tabindex="-1" id="ext-gen144"><label for="df2" style="width:110px;" class="x-form-item-label" id="ext-gen145"></label><div class="x-form-element" id="x-form-el-df2" style="padding-left:115px"><div id="df2" name="df2" class="x-form-display-field" style="height: 20px; width: 131px;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item x-hide-display" tabindex="-1" id="ext-gen146"><label for="ext-comp-1059" style="width:110px;" class="x-form-item-label" id="ext-gen147">责任部门:</label><div class="x-form-element" id="x-form-el-ext-comp-1059" style="padding-left:115px"><input type="text" size="20" autocomplete="off" id="ext-comp-1059" name="file.respDep" class="x-form-text x-form-field x-hide-display x-item-disabled x-form-readonly" style="width: 131px;" disabled="" readonly=""></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen148"><label for="ecoDep" style="width:110px;" class="x-form-item-label" id="ext-gen149">ECO部门<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ecoDep" style="padding-left:115px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen150" style="width: 131px;"><input type="hidden" name="file.ecoDep" id="ext-gen152" value="研发"><input type="text" size="24" autocomplete="off" id="ecoDep" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 131px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen151" style="display: none;"></div></div><div class="x-form-clear-left"></div></div></div></div></div><div id="ext-comp-1060" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 267px;"><div class="x-panel-bwrap" id="ext-gen108"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen109" style="width: 267px;"><div class="x-form-item " tabindex="-1" id="ext-gen153"><label for="creationDate" style="width:100px;" class="x-form-item-label" id="ext-gen154">填表日期:</label><div class="x-form-element" id="x-form-el-creationDate" style="padding-left:105px"><input type="text" size="20" autocomplete="off" id="creationDate" name="creationDate" class="x-form-text x-form-readonly x-form-field" readonly="" style="width: 148px;"></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen155"><label for="releaseDate" style="width:100px;" class="x-form-item-label" id="ext-gen156">发布日期:</label><div class="x-form-element" id="x-form-el-releaseDate" style="padding-left:105px"><input type="text" size="20" autocomplete="off" id="releaseDate" name="releaseDate" class="x-form-text x-form-readonly x-form-field" readonly="" style="width: 148px;"></div><div class="x-form-clear-left"></div></div><div class="x-form-item x-hide-display" tabindex="-1" id="ext-gen157"><label for="df" style="width:100px;" class="x-form-item-label" id="ext-gen158"></label><div class="x-form-element" id="x-form-el-df" style="padding-left:105px"><div id="df" name="df" class=" x-form-display-field x-hide-display" style="height: 20px; width: 148px;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item" tabindex="-1" id="ext-gen159"><label for="ext-comp-1061" style="width:100px;" class="x-form-item-label" id="ext-gen160">合作申请人<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1061" style="padding-left:105px"><div class="x-form-field-wrap x-form-file-wrap" id="ext-gen161" style="width: 148px;"><input type="text" size="20" autocomplete="off" id="ext-comp-1061" class="x-form-text x-form-readonly x-form-field x-form-file-text" readonly="" style="width: 113px;"><table id="ext-comp-1182" cellspacing="0" class="x-btn x-form-file-btn x-btn-noicon x-item-disabled" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr><tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="" unselectable="on"><button type="button" id="ext-gen162" class=" x-btn-text">选择</button></em></td><td class="x-btn-mr"><i> </i></td></tr><tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr></tbody></table><input type="hidden" size="20" autocomplete="off" id="ext-comp-1183" name="file.otherMakerIds" class="x-form-hidden x-form-field" value="9612,14211"></div></div><div class="x-form-clear-left"></div></div><input type="hidden" size="20" autocomplete="off" id="ext-comp-1062" name="file.otherMakerNames" class=" x-form-hidden x-form-field" value="涂涛,修晨宇"><div class="x-form-item" tabindex="-1" id="ext-gen163"><label for="df3" style="width:100px;" class="x-form-item-label" id="ext-gen164"></label><div class="x-form-element" id="x-form-el-df3" style="padding-left:105px"><div id="df3" name="df3" class="x-form-display-field" style="height: 20px; width: 148px;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item x-hide-display" tabindex="-1" id="ext-gen165"><label for="ext-comp-1063" style="width:100px;" class="x-form-item-label" id="ext-gen166">责任部门审核:</label><div class="x-form-element" id="x-form-el-ext-comp-1063" style="padding-left:105px"><div class="x-form-field-wrap x-form-file-wrap" id="ext-gen167" style="width: 148px;"><input type="text" size="20" autocomplete="off" id="ext-comp-1063" class="x-form-text x-form-readonly x-form-field x-form-file-text x-hide-display x-item-disabled" readonly="" style="width: 0px;" disabled=""><table id="ext-comp-1184" cellspacing="0" class="x-btn x-form-file-btn x-btn-noicon x-item-disabled" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr><tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="" unselectable="on"><button type="button" id="ext-gen168" class=" x-btn-text">选择</button></em></td><td class="x-btn-mr"><i> </i></td></tr><tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr></tbody></table><input type="hidden" size="20" autocomplete="off" id="ext-comp-1185" name="file.respApId" class=" x-form-hidden x-form-field x-item-disabled" value="" disabled=""></div></div><div class="x-form-clear-left"></div></div><div id="ext-comp-1064" class=" x-panel x-panel-noborder" style="width: 267px;"><div class="x-panel-bwrap" id="ext-gen169"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder x-column-layout-ct" id="ext-gen170" style="width: 267px;"><div class="x-column-inner" id="ext-gen172" style="width: 267px;"><div id="ext-comp-1065" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 133px;"><div class="x-panel-bwrap" id="ext-gen174"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen175" style="width: 133px;"><div class="x-form-item " tabindex="-1" id="ext-gen180"><label for="org" style="width:100px;" class="x-form-item-label" id="ext-gen181">涉及组织<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-org" style="padding-left:105px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen182" style="width: 21px;"><input type="hidden" name="file.org" id="ext-gen184" value="LZ2"><input type="text" size="24" autocomplete="off" id="org" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 21px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen183" style="display: none;"></div></div><div class="x-form-clear-left"></div></div></div></div></div><div id="ext-comp-1066" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 133px;"><div class="x-panel-bwrap" id="ext-gen177"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen178" style="width: 133px;"><div class="x-form-item x-hide-display" tabindex="-1" id="ext-gen185"><label for="ext-comp-1067" style="width:100px;" class="x-form-item-label" id="ext-gen186">代工组织:</label><div class="x-form-element" id="x-form-el-ext-comp-1067" style="padding-left:105px"><input type="text" size="20" autocomplete="off" id="ext-comp-1067" name="file.oemOrg" class="x-form-text x-form-readonly x-form-field x-hide-display" readonly=""></div><div class="x-form-clear-left"></div></div></div></div></div><div class="x-clear" id="ext-gen173"></div></div></div></div></div><input type="hidden" size="20" autocomplete="off" id="needProd" name="needProd" class=" x-form-hidden x-form-field" value="是"></div></div></div><div id="ext-comp-1068" class=" x-panel x-panel-noborder x-column" style="width: 787px;"><div class="x-panel-bwrap" id="ext-gen111"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder x-column-layout-ct" id="ext-gen112" style="width: 787px;"><div class="x-column-inner" id="ext-gen187" style="width: 787px;"><div id="ext-comp-1069" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 259px;"><div class="x-panel-bwrap" id="ext-gen189"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen190" style="width: 259px;"><div class="x-form-item " tabindex="-1" id="ext-gen195"><label for="changeType" style="width:115px;" class="x-form-item-label" id="ext-gen196">更改类型<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-changeType" style="padding-left:120px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen197" style="width: 126px;"><input type="hidden" name="file.changeType" id="ext-gen199" value="软件更改(不涉及组代)"><input type="text" size="24" autocomplete="off" id="changeType" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 126px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen198" style="display: none;"></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item" tabindex="-1" id="ext-gen200"><label for="involveHardware" style="width:115px;" class="x-form-item-label" id="ext-gen201">是否涉及硬件<span style="border:1px solid;border-radius:50%;color:blue;text-align:center;"> ? </span><font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-involveHardware" style="padding-left:120px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen202" style="width: 126px;"><input type="hidden" name="file.involveHardware" id="ext-gen204" value="不涉及"><input type="text" size="24" autocomplete="off" id="involveHardware" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 126px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen203" style="display: none;"></div></div><div class="x-form-clear-left"></div></div></div></div></div><div id="ext-comp-1070" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 519px;"><div class="x-panel-bwrap" id="ext-gen192"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen193" style="width: 519px;"><div class="x-form-item " tabindex="-1" id="ext-gen205"><label for="ext-comp-1071" style="width:110px;" class="x-form-item-label" id="ext-gen206">题目<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1071" style="padding-left:115px"><input type="text" size="20" autocomplete="off" id="ext-comp-1071" name="file.title" class="x-form-text x-form-field x-form-readonly" style="width: 396px;" readonly=""></div><div class="x-form-clear-left"></div></div></div></div></div><div class="x-clear" id="ext-gen188"></div></div></div></div></div><div id="ext-comp-1072" class=" x-panel x-panel-noborder x-column" style="width: 787px;"><div class="x-panel-bwrap" id="ext-gen114"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder x-column-layout-ct" id="ext-gen115" style="width: 787px;"><div class="x-column-inner" id="ext-gen207" style="width: 787px;"><div id="ext-comp-1073" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 259px;"><div class="x-panel-bwrap" id="ext-gen209"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen210" style="width: 259px;"><div class="x-form-item " tabindex="-1" id="ext-gen215"><label for="ext-comp-1074" style="width:115px;" class="x-form-item-label" id="ext-gen216">是否对返修品有效<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1074" style="padding-left:120px"><div class="x-form-field-wrap x-form-field-trigger-wrap" id="ext-gen217" style="width: 126px;"><input type="hidden" name="file.effectReturn" id="ext-gen219" value="否"><input type="text" size="24" autocomplete="off" id="ext-comp-1074" class="x-form-text x-form-field x-trigger-noedit x-form-readonly" readonly="" style="width: 126px;"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen218" style="display: none;"></div></div><div class="x-form-clear-left"></div></div></div></div></div><div id="ext-comp-1075" class=" x-panel x-panel-noborder x-form-label-right x-column" style="width: 519px;"><div class="x-panel-bwrap" id="ext-gen212"><div class="x-panel-body x-panel-body-noheader x-panel-body-noborder" id="ext-gen213" style="width: 519px;"><div class="x-form-item x-hide-display" tabindex="-1" id="ext-gen220"><label for="ext-comp-1078" style="width:110px;" class="x-form-item-label" id="ext-gen221">有效范围:</label><div class="x-form-element" id="x-form-el-ext-comp-1076" style="padding-left:115px"><div id="ext-comp-1077" class=" x-form-composite x-box-layout-ct x-form-field x-hide-display" style="width: 389px;"><div class="x-box-inner" id="ext-gen223" style=""><div class="x-form-check-wrap x-box-item" id="ext-gen224" style="width: 115px; left: 0px; top: 0px;"><input type="checkbox" autocomplete="off" id="ext-comp-1078" name="file.effectRange" class=" x-form-checkbox x-form-field x-form-readonly" value="Y" checked="" readonly=""><label for="ext-comp-1078" class="x-form-cb-label" id="ext-gen225"> </label></div></div></div></div><div class="x-form-clear-left"></div></div><div class="x-form-item " tabindex="-1" id="ext-gen226"><label for="ext-comp-1079" style="width:110px;" class="x-form-item-label" id="ext-gen227">对以下机型有效<font color="red">*</font>:</label><div class="x-form-element" id="x-form-el-ext-comp-1079" style="padding-left:115px"><input type="text" size="20" autocomplete="off" id="ext-comp-1079" name="file.itemModel" class="x-form-text x-form-field x-form-readonly" style="width: 396px;" readonly=""></div><div class="x-form-clear-left"></div></div></div></div></div><div class="x-clear" id="ext-gen208"></div></div></div></div></div><div class="x-clear" id="ext-gen101"></div></div>如上是一段html代码,我有很多这样的片段。我要你从完整html页面中找出这些对,如ext-comp-1056中"是否研发设计责任"对应“是”。使用playwright,最后保存到文本中
最新发布
11-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值