W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
Ext.form.Panel:Form面板為表單提供了一個標準容器,它本質(zhì)上是一個標準的Ext.panel.Panel,它自動創(chuàng)建一個用于管理任何Ext.form.field.Field對象的BasicForm。
這里是創(chuàng)建Ext.form.Panel容器的簡單語法。
Ext.create('Ext.form.Panel', {
items: [child1, child2] // 這樣我們可以將不同的子元素作為容器項添加到容器中。
});
下面是一個簡單的例子顯示Ext.form.Panel容器。
<!DOCTYPE html>
<html>
<head>
<link href="./ext-6.0.0/build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet">
<script src="./ext-6.0.0/build/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function () {
var child1 = Ext.create('Ext.Panel',{
html: 'Text field'
});
var child2 = Ext.create('Ext.Panel',{
html: 'Text field'
});
Ext.create('Ext.form.Panel', {
renderTo: Ext.getBody(),
width: 100,
height : 100,
border : true,
frame : true,
layout: 'auto',// auto is one of the layout type.
items: [child1, child2]
});
});
</script>
</head>
<body>
</body>
</html>
運行結(jié)果截圖:
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: