zoukankan      html  css  js  c++  java
  • jQuery中文乱码完美解决方案


     
    最近使用jQuery遇到中文乱码问题,其实他的中文乱码就是因为contentType没有指定编码,只需在jQuery.js中搜索
    ’contentType’
    然后在application/x-www-form-urlencoded后面加上
    ; charset=UTF-8
    最终变成
    contentType:"application/x-www-form-urlencoded; charset=UTF-8"
     
    问题搞定,我觉得最搞笑的是网上这么多人都在自己的代码里面再进行一次转码,还写了很详细的分析,该如何转,太滑稽了.

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    javascript基础
    html基础
    css基础
    django-session和cookie
    rest架构
    django-models
    django-templates
    Alignment
    ural 1225.Flags
    ural 1009. K-based Numbers
  • 原文地址:https://www.cnblogs.com/shipeng22022/p/4614104.html
Copyright © 2011-2022 走看看