javascript 正则表达式问题
<head runat="server"><title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<script language ="javascript">
var top=/^huawei/;
var textstring="huawei,nihao!";
var result=top .test (textstring);
document.write(result);
if(result)
document .write("匹配");
else
alert("不匹配");
</script>
</div>
</form>
</body>
</html>
运行后,浏览器没反应,问题在哪,谢谢