focus() 方法用于給予鏈接焦點。
anchorObject.focus()
該方法可滾動文檔以使 Anchor 對象的位置變?yōu)榭梢姟?/p>
<html> <head> <style type="text/css"> a:active {color:green} </style> <script type="text/javascript"> function getfocus() {document.getElementById('myAnchor').focus()
} function losefocus() {document.getElementById('myAnchor').blur()
} </script> </head> <body> <a id="myAnchor" href="http://theartemis.cn">Visit 365jz.com.cn</a> <br /><br/> <input type="button" onclick="getfocus()" value="Get focus"> <input type="button" onclick="losefocus()" value="Lose focus"> </body> </html>
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答!! 點擊進入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權所有 鄂ICP備17013400號