Reputation: 143
The window.alert function does not work and the debugger in internet explorer highlights
registerForm()
in the onclick event on line 15 and gives the error "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>
Upvotes: 2
Views: 14660
Reputation: 100175
change
<script type="text/javscript">
to
<script type="text/javascript"> //you missed "a" in script tag
Upvotes: 1