Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Ajax Find currenly which field is having focus on html page?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Navnath
Find currenly which field is having focus on html page?
1 Answer(s)      5 years and 3 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


Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com