René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Submitting a form with JavaScript | ||
The following example shows how to submit a form without buttons.
<html> <head><title>Submitting a form with JavaScript</title> <script language='javascript'> function submit_frm(d) { frm.do_what.value=d; frm.submit() } </script> </head> <body> <form name='frm'> <input name='do_what' type='hidden' value='none'> </form> <a href='javascript:submit_frm("one" )'>Do one</a> <a href='javascript:submit_frm("two" )'>Do two</a> <a href='javascript:submit_frm("three")'>Do three</a> </body> </html> |