Navnath
Find currenly which field is having focus on html page?
1 Answer(s)      5 years and 11 months ago
Posted in : Ajax
Advertisement
View Answers

July 6, 2009 at 5:03 PM


Hi Friend,

Try the following code:

<html>
<head>
<script>
function whichBlur(f){
alert(f)}
</script>
</head>
<body>
<form name=Form1 method="post">
<input name="Form1" type="submit" value="Form1" onfocus="whichBlur(this.name)">
</form>
<form name=Form2 method="post">
<input name="Form2" type="submit" value="From2" onfocus="whichBlur(this.name)">
</form>
</body>
</html>

Thanks