2012年8月4日

js替换特殊字符及取小数点处理

摘要: 1 function Check(s) {2 var str = s.replace(/%/g, "%25 ").replace(/\+/g, "%2B ").replace(/\s/g, "+ "); // % + \s 3 str = str.replace(/-/g, "%2D ").replace(/\*/g, "%2A ").replace(/\//g, "%2F "); // - * / 4 str = str.replace(/\&/g, "% 阅读全文

posted @ 2012-08-04 15:51 人在程序 阅读(2306) 评论(0) 推荐(0) 编辑

导航