input name in javascript

houssam_ballout

New Member
Hi
I want to create a javascript function in which:
when the user double clicks on some input form (like a text box), that function will return the name of that field?
thanks
 
<script type="text/javascript">
function getName(n) {
alert(n);
}
</script>
in html:

<input type="text" name="idontknow" onclick="getName(this.name)" />
 
Back
Top