I am using the following html
<input type="button" value="Get" onClick="get();">
get(); it is some function declared earlier using javascript
I know if the input type is submit it works, but how to make it work for the following?
Enter on Key Board.
get function
function get() {
$.post('ass.php', { name: form.name.value },
function(output){
$('#age').html(output).show();
});
}
What are you trying to do is against standards: http://www.w3.org/wiki/HTML/Elements/input/button “The button state represents a button with no default behavior.”
The only solution is to catch keyPress action, with appropriate button code.