Hello,
How would I go about amending the code below to only be only work on the form name "login"?
the code below is not working for me =\ and im out of ideas.
Code:
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$("login").bind("click keypress", function(evt) {
var keyCode = evt.which || evt.keyCode;
if (keyCode == 13) {
alert("ENTER pressed");
}
});
});
</script>
<form name="login">
<input type="text" />
<input type="submit" id="submit1" value="First" />
<input type="submit" id="submit2" value="Second" />
</form>
</body>
</html>
Any help is greatly appreciated.
Cheers,
J