JS去掉所有空格的例子:
var s = "asd ddd bbb sss";
var reg = /\s/g;
var ss = s.replace(reg, "");
alert(ss);
JS得到PHP值的例子(也就是把PHP语句嵌套进JS中):
var i=''; alert(i);
JS去掉所有空格的例子:
var s = "asd ddd bbb sss";
var reg = /\s/g;
var ss = s.replace(reg, "");
alert(ss);
JS得到PHP值的例子(也就是把PHP语句嵌套进JS中):
var i=''; alert(i);