Why isn't my event handler working
I copy pasted this straight from a previous project and edited it just a
bit, the previous project works just fine, I'm stumped as to why this
simple event handler isn't working. What am I not seeing here?
<html>
<head>
<?php
mysql_connect('localhost', 'root', 'root');
mysql_select_db('lab4data');
?>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type = "text/javascript">
function init() {
alert("why won't you work");
}
window.addEventListener("load", init, false);
</script>
</head>
<body>
<form id = "form" align = "center">
<div id = "index">
<div id = "unandpw">
Username:
<input type="text">
<br>
Password:
<input type ="password" >
</div>
<!-- end unandpw -->
<div id = "buttons">
<button type = "button" onclick = "checkinfo()">
Login
</button>
<button type = "button" onclick = "register();">
Register
</button>
</div>
<!-- end buttons -->
</div>
<!--index end -->
</form>
</body>
</html>
No comments:
Post a Comment