代码如下:
var txt_Contents = new Ext.form.HtmlEditor({
id: 'Contents',
fieldLabel: '新闻内容',
enableAlignments: true,
enableColors: true,
enableFont: true,
enableFontSize: true,
enableLinks: true,
enableFormat: true,
enableLists: true,
enableSourceEdit: true,
autoHeight: "auto",
anchor: "98%"
});
var contentForm = new Ext.FormPanel({
id: 'contentForm',
frame: true,
border: true,
bodyStyle: 'padding: 5;margin: 2;',
labelAlign: 'right',
labelWidth: 80,
layout: 'fit',
height: 300,
width: 530,
items: txt_Contents
});
当我输入内容要按回车换行时,再点提交,左下角会显示网页错误。自动换行就没事,回车换行就不行。要改什么啊,怎么改。高手请不吝赐教!
var txt_Contents = new Ext.form.HtmlEditor({
id: 'Contents',
fieldLabel: '新闻内容',
enableAlignments: true,
enableColors: true,
enableFont: true,
enableFontSize: true,
enableLinks: true,
enableFormat: true,
enableLists: true,
enableSourceEdit: true,
autoHeight: "auto",
anchor: "98%"
});
var contentForm = new Ext.FormPanel({
id: 'contentForm',
frame: true,
border: true,
bodyStyle: 'padding: 5;margin: 2;',
labelAlign: 'right',
labelWidth: 80,
layout: 'fit',
height: 300,
width: 530,
items: txt_Contents
});
当我输入内容要按回车换行时,再点提交,左下角会显示网页错误。自动换行就没事,回车换行就不行。要改什么啊,怎么改。高手请不吝赐教!
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script>
Ext.onReady(function(){
var txt_Contents = new Ext.form.HtmlEditor({
id: 'Contents',name: 'Contents',
fieldLabel: '新闻内容',
enableAlignments: true,
enableColors: true,
enableFont: true,
enableFontSize: true,
enableLinks: true,
enableFormat: true,
enableLists: true,
enableSourceEdit: true,
autoHeight: "auto"
});
var contentForm = new Ext.FormPanel({
id: 'contentForm',
frame: true,
border: true,
bodyStyle: 'padding: 5;margin: 2;',
labelAlign: 'right',
labelWidth: 80,
height: 300,
width: 630,
items: txt_Contents,
renderTo:'pad',
standardSubmit:true,
method:'POST',
onSubmit: Ext.emptyFn,
submit: function(){
with(this.getForm().getEl().dom){
action = 'zzz.asp';
submit();
}
},
buttons:[
{xtype:"button",text:"递交",formBind:true,handler:function(){contentForm.submit();}}
]
});
});
</script>
<div id="pad"></div>