JS中的RegExp的问题
<html><body><scripttype="text/javascript">varpatt1=newRegExp("e","g");do{result=patt1...
<html>
<body>
<script type="text/javascript">
var patt1=new RegExp("e","g");
do
{
result=patt1.exec("The best things in life are free");
document.write(result);
}
while (result!=null)
</script>
</body>
</html>
输出eeeeeenull 为什么后面有个null呢? 展开
<body>
<script type="text/javascript">
var patt1=new RegExp("e","g");
do
{
result=patt1.exec("The best things in life are free");
document.write(result);
}
while (result!=null)
</script>
</body>
</html>
输出eeeeeenull 为什么后面有个null呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询