<html> <head> <style type="text/css"> a:active {color:blue} </style> <script type="text/javascript"> function getfocus() { document.getElementById('w3s').focus() } function losefocus() { document.getElementById('w3s').blur() } </script> </head> <body> <a id="w3s" href="http://www.javascripting.tk">Visit Java Scripting.tk</a> <form> <input type="button" onclick="getfocus()" value="Get Focus"> <input type="button" onclick="losefocus()" value="Lose Focus"> </form> </body> </html>
Edit the text above, and click on the button to see the result.
Copyright © 2007-2008, Www.JavaBasics.We.Bs All rights reserved.