日期:2014-05-17 浏览次数:20773 次
<!doctype html>
<html>
<head>
<script>
window.onload=function() {
var oIpt1=document.getElementById("txt1");
var oIpt2=document.getElementById("txt2");
oIpt1.focus();
oIpt1.onkeypress=function() {
if(oIpt1.value.length>=1)
oIpt2.focus();
};
};
</script>
</head>
<body>
name:<input type="text" id="txt1" maxlength="1" /><br />
pwd:<input type="text" id="txt2" />
</body>
</html>