I created a text box and wrote onfocus="getFocus()"
Now I wrote a function in javascript
function getFocus()
{
alert('Hello I Got Focus !!');
}
The problem in IE8 works fine, but in IE9 the warning does not appear. Can anyone say what is wrong with the code?
I also tried
txtAmt.Attributes.Add("onfocus","getFocus()")
but still it didnβt work
I tried too
txtAmt.Attributes.Add("onfocus","javascript:getFocus();")
Now I'm worried .. what to do ??
source
share