日期:2014-05-16  浏览次数:20411 次

问个简单的正则式、子串查找 问题
<script   language=javascript>
var   regParam=/=\d+/;
var   strParam= "id=124356-2007&parent=none ";
var   strLeftID=strParam.replace(regParam, "我cao ");
//怎么获取strParam中匹配regParam的子串
</script>

------解决方案--------------------
<script language=javascript>
var regParam=/=\d+/;
var strParam=split( "id=124356-2007&parent=none ", "- ");
var strLeftID=strParam[0].replace(regParam, "我cao ")+strParam[1];
//怎么获取strParam中匹配regParam的子串
</script>

------解决方案--------------------
- -`
------解决方案--------------------
-_-!!!