I have the following javascript.
<script>
function getMethod(id){alert(id);}
</script>
following is html,
<table id="tbl1">
<tr>
<td><input type="button" onclick="getMethod()"/></td>
</tr>
</table>
I need to pass table id "tbl1" to javascript method getMethod on click event of html button. so what should I do? what I want is something like this,(Passing table ID onclick method's parameters)
<input type="button" onclick="getMethod('$("tbl1").ID')"/>
how can I do this?
Thanks