window.alert功能不起作用,Internet Explorer中的调试器突出显示
registerForm()
在第15行的onclick事件中,并给出错误“Object Expected”。
<!DOCTYPE html>
<head>
<title></title>
<meta charset="utf-8" />
<script type="text/javscript">
/* <![CDATA[ */
function registerForm() {
window.alert("Function is working");
}
/* ]]> */
</script>
</head>
<body>
<form action="" method="get" enctype="application/x-www-form-urlencoded">
<p><input type="button" value="Register" onclick="registerForm();" /></p>
</form>
</body>
</html>
</body>
答案 0 :(得分:1)
变化
<script type="text/javscript">
到
<script type="text/javascript"> //you missed "a" in script tag