Ext中的复选框取值问题

在自行导入了Ext库文件之后在加入如下代码: Ext.onReady(function(){ Ext.form.Field.prototype.msgTarget = 'side'; var fp = new Ext.FormPanel({ frame:true, title:'Test CheckBox and Radio', labelWidth:110, width:700, renderTo:'divChk', bodyStyle:'padding:0 10px 0;', items:[{ xtype:'fieldset', title:'CheckBox Groups', autoHeight:true, items:[ { xtype:'checkboxgroup', fieldLabel:'Auto Layout', items:[ {boxLabel:'复选框1',name:'chk1',checked:true,inputValue:'值1'}, {boxLabel:'复选框2',name:'chk2',inputValue:'2'}, {boxLabel:'复选框3',name:'chk3',inputValue:'3'}, {boxLabel:'复选框4',name:'chk4',inputValue:'4'}, {boxLabel:'items5',name:'chk5',inputValue:'5'}, {boxLabel:'items6',name:'chk6',inputValue:'6'}, {boxLabel:'items7',name:'chk7',inputValue:'7'}, {boxLabel:'items8',name:'chk8',inputValue:'8'}, {boxLabel:'items9',name:'chk9',checked:true,inputValue:'九'} ]} ] }], buttons:[ {text:'提 交',handler:function(){ if(fp.getForm().isValid()) { Ext.Msg.alert("选中的复选框",fp.getForm().getValues(true).replace(/&/g,', ')); } }}, {text:'重 置',handler:function(){fp.getForm().reset()}} ] }); }); 在HTML中的代码为:
这样子就得到如下运行结果: 取得的汉字值还是乱码,不知道怎么改了,那位高手能不吝赐教呀:

你可能感兴趣的:(html,json,ext,prototype,FP)