<html>
<head>
<style type="text/css">
a:active {color:green}
</style>


<script type="text/javascript">
function getfocus(){
document.getElementById('myAnchor').focus()
}
function lostfocus(){
document.getElementById('myAnchor').blue()
}
</script>










</head>


<body>
<a >访问 W3School.com.cn</a>
<br /><br/>
<input type="button" onclick="getfocus()" value="获得焦点">
<input type="button" onclick="losefocus()" value="失去焦点">
</body>


</html>

相关文章:

  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2023-03-19
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
相关资源
相似解决方案