<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>focus</title>
<script type="text/javascript">
window.onload = function() {
var button = document.getElementById("myButton");
button.focus();
alert(document.activeElement === button);
}
</script>
</head>
<body>
<button type="button" id="myButton">Click Me!</button>
</body>
</html>
focus焦点管理
猜你喜欢
转载自blog.csdn.net/qq_42740745/article/details/84260273
今日推荐
周排行