How to Make Default Button?

hellow friends, can enybody know how to make a default button so that when user enter some text in textbox and then pess Enter then button_click event should fires. If any body have idea then pls help me.

$(document).ready(function()
{ $(‘#TextBoxId’).keypress(function(e)
{ i
f(e.keyCode==13) // 13 is enter key code
$(‘#linkadd’).click();
});
});