开发者社区 问答 正文

java-websphere 乱码

从tomcat6迁移到websphere6,

jquery-ajax调用 struts2 ,使用data:params ,中有中文参数,出现乱码。

ps:本地开发tomcat中没有问题!求解!

展开
收起
a123456678 2016-07-11 10:52:57 1934 分享 版权
1 条回答
写回答
取消 提交回答
  • 使用escape(encodeURIComponent(varstring))对中文值进行转码; var title=document.getElementById("title").value; title=encodeURIComponent(title); var url="/exam/level.do?method=toadd&title="+title ;

    2019-07-17 19:54:01
    赞同 展开评论
问答分类:
问答标签:
问答地址: