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);
}
});
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);
}
});