I want to have a form with an input text field and be able to respond (display an alert text box) if the user types in the word ‘hello’ (case insensitive match).
What event do I need to trap (the text input field does not seem to have a change event.
This is what I have so far:
<html>
<head>
<title>Some test</title>
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<form action="something.php" method="post">
Field1: <input id="field1" type="text">
</form>
<script type="text/javascript">
$(document).ready(function(){
// what?
});
</script>
</body>
</html>
Try: