87,992
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
</style>
</head>
<body>
<textarea id="a">123</textarea>
<button id="btn">click</button>
<script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
$('btn').onclick = function(){
$('a').focus();
}
</script>
</body>
</html>