hello I try to grab the submit event, and then I try to pop an alert that says "werks" so I know it works. Note that I have double-checked that the jquery.js file is present in the same folder, and it is the newest jquery.min.js from the jquery website.
When I submit the form, it automatically goes into "get" mode and displays this URL in the URL bar in my browser: "http://localhost/test.html?input=" instead of showing me the alert. I think jquery is trolling me. Full code below:
<!DOCTYPE html> <html> <head> <title>test</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $('#form').submit(function(event){ event.preventDefault(); alert('werks'); });</script> </head> <body> <form id="form"> <input type="text" name="input"> <input type="submit" value="Send"> </form> </body> </html>