`
bainian_205
  • 浏览: 44700 次
  • 性别: Icon_minigender_1
  • 来自: 河北
社区版块
存档分类
最新评论

extjs url 中文参数乱码问题

 
阅读更多
encodeURI(url)就行了,服务器端可以得到正确的中文
JScript code
Ext.Ajax.request({
url :'./json/role_add.action?role.roleid='
  +param.id+'&role.roleName='
  +encodeURI(param.name)+'&role.roleDesc='+encodeURI(param.desc),
success: function(response) {
Ext.Msg.alert('成功', response.responseText);
},
failure: function(response) {
Ext.Msg.alert('失败', response.responseText);
}
});

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics