If this is the exact code you have written, then I think you have ot included jQuery library in the page.
You need to include jQuery file before you can use the $("#myform")
notation.
Also specify some action URL where you want to submit the page to ?