Extjs 解决乱码

js主要是使用  {name : encodeURIComponent(value)}  

java接受主要是 java.net.URLDecoder.decode(name, "utf-8"); 

ajax传参乱码

              infoStore.on("beforeload",function(){
			var newParams={
					certification:encodeURIComponent(certificationName)
			};
			Ext.apply(infoStore.proxy.extraParams,newParams);
		});
		infoStore.load({
	   		  params:{
	   		    start: 0,
	   		    limit: itemsPerPage
	   		  } 
	   	 }); 


form表单

   var username=myForm.getForm().findField("username").getValue();
   var info=myForm.getForm().findField("info").getValue();
   if(!Ext.isEmpty(username))
     myForm.getForm().findField("username").setValue(encodeURIComponent(batName));
   if(!Ext.isEmpty(info))
     myForm.getForm().findField("info").setValue(encodeURIComponent(userName))
   myForm.getForm().submit({
     success : function(form, action) {
        Ext.Msg.alert(""信息"", action.result.msg); 
     },
     failure : function() {
       Ext.Msg.alert(""错误"", ""体系失足,批改失败!"");
     }
  });

但是对于大量的form表单,总共不至于每个都这样,没不知道怎么解决


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值