I have one html div on my jsp page, on that i have put one anchor tag, please find code below for that,
when click on div alert key
$(document).delegate(".searchbtn", "click", function() { var key=$.trim($('#txtkey').val()); alert(key); });