dojo中 xhr.post向后台传参出现乱码
生活随笔
收集整理的這篇文章主要介紹了
dojo中 xhr.post向后台传参出现乱码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在js文件中加入
headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},?
?
var content = {"field":"參數名稱"}; xhr.post({url : config.contextPath+"/getData/showfields",handleAs : 'json',content:content,headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, load : lang.hitch(this, function(response){this._pointFieldsAlians(feature,response);}),error : function(response, ioArgs) {}});?
總結
以上是生活随笔為你收集整理的dojo中 xhr.post向后台传参出现乱码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ionic 标签中添加单击事件 、双击事
- 下一篇: js文件中定义全局配置文件