I am trying to pass an element through my function and output the id.
Here is what I mean:
<input id='password' style="display:inline-block" type="password" name='Password' onKeyDown="setTimeout('validate(this)', 10)" />
and the javascript:
var validate = function(element)
{
alert(element.id);
}
Is this the correct way to do the following? All I get is undefined when it alerts. Thank you.
setTimeout()because it is the same as usingeval.