Add submit handler?

Add submit handler?


I am using ASP.NET/MVC but also trying to use JQuery to do some async postbacks.
 
I am totally new at Jquery and still find it difficult.
 
All I want to do is, to have a submit button using the standard HTML submit button but then use some jquery to add a click handler to it, so when clicked, it will do something such as a post or an alert. This is what I have, and it does not work at all. nothing happens:
 
<script language="javascript" type="text/javascript">

$(

"#cmdAdd" ).submit( function () { alert( 'hi' ); });

</script>
 

< input type ="submit" id ="btnAdd" value ="Add Item" />

 

 

thats basically it. I dont have a form tag or anything, just everything in an HTML page and thats it.

how can I add a handler to that button?