input向后台传递值中含有括号
来源:互联网 发布:英文写作软件 知乎 编辑:程序博客网 时间:2024/06/10 08:31
string.fromCharCode() 可接受一个指定的 Unicode 值,然后返回一个与其对应的字符串的值。
在input中获取值有括号的时候需要对括号的中英文括号进行处理,然后传入到后台
var enterpriseName =$("#enterpriseName").val().trim();
enterpriseName=enterpriseName.replace(String.fromCharCode(40),String.fromCharCode(65288));
enterpriseName=enterpriseName.replace(String.fromCharCode(41),String.fromCharCode(65289));
String.fromCharCode(40)返回的是英文状态下的“(”小括号,String.fromCharCode(65288)返回的是中文状态下的“(”小括号;
String.fromCharCode(40)返回的是英文状态下的“)”反括号,String.fromCharCode(65288)返回的是中文状态下的“)”反括号;
整句的意思是将名称中出现的英文括号用中文替换掉。
阅读全文
1 0
- input向后台传递值中含有括号
- jsp中request向后台传递汉字乱码
- jQuery中使用ajax向后台传递数据
- springMVC中前台向后台传递参数的方式
- springMVC中使用ajax向后台传递数组
- url中向后台传递中文乱码解决方法
- url中向后台传递参数中文乱码
- url中向后台传递中文乱码解决方法
- urlurl中向后台传递中文乱码解决方法
- url中向后台传递中文乱码解决方法
- LinkButton向后台传递参数
- Uploadify从前台向后台传递参数
- 前台向后台传递中文值时 乱码
- 用dwr 向后台传递java对象
- javascript向后台传递中文参数乱码
- JQuery Ajax向后台传递数组
- jquery ajax 向后台传递数组
- 前台向后台传递中文汉字问题
- truncate,drop和delete的区别
- 有关jquery的一坨内容,!!!∑(゚Д゚ノ)ノ------you can code, just code
- E
- hadoop--combiner、partitioner学习
- Android Dagger2
- input向后台传递值中含有括号
- 迷宫 dfs
- 2 Traffic Server限速插件
- 二叉树的所有的遍历算法
- LeetCode
- 常见文件字节码格式
- Python安装cx_Oracle模块和suds.client模块调用webservice服务
- 努力:论文CCCV 2017录取通知
- 轮播 多条目加载