Onclick javascript pass this object

onclick javascript pass this object

Below is demo html which will show you how to pass this object to javascript function and get id of it:

<meta charset="ISO-8859-1">
<title>onclick javascript pass this object</title>
<script type="text/javascript">

function testing(value) {	


<input type="text" name="test" id="test" onclick="testing(this)">


Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *