在html表单中包含extjs字段
我有一个纯html表单,需要将html输入与ExtJS字段混合,但不想使用ExtJS panel/form/application,只在html表单中插入一个ExtJS字段 这里是我的示例编码(不工作):在html表单中包含extjs字段,html,extjs,Html,Extjs,我有一个纯html表单,需要将html输入与ExtJS字段混合,但不想使用ExtJS panel/form/application,只在html表单中插入一个ExtJS字段 这里是我的示例编码(不工作): 笨蛋 第一: Ext.create('Ext.form.TextField'{ id:“第二个”, 值:'second', renderTo:“div1” }) 你能给我一个如何获得这种混合的提示吗?你可以创建ExtJS组件,但要在加载库文件之后。这意味着在Ext.onReady()的内
笨蛋
第一:
Ext.create('Ext.form.TextField'{
id:“第二个”,
值:'second',
renderTo:“div1”
})
你能给我一个如何获得这种混合的提示吗?你可以创建ExtJS组件,但要在加载库文件之后。这意味着在Ext.onReady()的内部:
我更新了您的示例。您可以创建ExtJS组件,但必须在加载库文件之后。这意味着在Ext.onReady()的内部: 我更新了您的示例。此问题(“renderTo”生成错误“TypeError:Ext.resetElement未定义”)出现在ExtJS 4.1.1中,但在ExtJS 5.0中没有出现 对于ExtJS,4.1.1是一个可行的解决方案(可在Internet上找到): 此问题(“renderTo”生成错误“TypeError:Ext.resetElement未定义”)出现在ExtJS 4.1.1中,但在ExtJS 5.0中没有出现 对于ExtJS,4.1.1是一个可行的解决方案(可在Internet上找到):
我希望避免Ext.onReady用于单个组件我希望避免Ext.onReady用于单个组件
<html>
<head>
<title>Dummy</title>
<link href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css" rel="stylesheet" />
<script src="http://cdn.sencha.io/ext-4.1.1-gpl/ext-all.js"></script>
</head>
<body>
<form action="dummy.php" method="get">
First: <input name="first"><br>
<div id='div1'></div>
<script type="text/javascript">
Ext.create( 'Ext.form.TextField', {
id:'second',
value:'second',
renderTo:'div1'
})
</script>
<input type=submit value="Ok"> <input type=reset value="Cancel"><br>
</form>
</body>
</html>
Ext.onReady(function(){
Ext.create('Ext.form.TextField', {
id:'second',
value:'second',
renderTo:'div1'
});
});
Ext.resetElement = Ext.getBody(); // #WORKAROUND
Ext.create( 'Ext.form.TextField', {
id:'second',
value:'second',
renderTo:'div1'
})