input 如何光标默认选择啊?
2009-09-25 17:29:43 by 【6yang】,
237
visits,
收藏 |
返回
<html>
<head>
<script type="text/javascript">
function setFocus()
{
document.getElementById("fname").focus()
}
</script>
</head>
<body onload="setFocus()">
<form>
姓名:<input type="text" id="fname" size="30"><br />
年龄:<input type="text" id="age" size="30">
</form>
</body>
</html>
share