+ 3
When do we use "this" at a function??
4 Answers
+ 5
I think it would be helpfull for your question
<button id="1" onClick="reply_click(this.id)">B1</button>
<button id="2" onClick="reply_click(this.id)">B2</button>
<button id="3" onClick="reply_click(this.id)">B3</button>
<script>
function reply_click(clicked_id)
{
alert(clicked_id);
}
</script>
+ 3
Thank you my friend
+ 2
no need for thank always be there for help^_^
+ 1
Oh don not tell that it wasn't your duty