开打网页自动获得焦掉函数

javascript

2008-10-18 09:44

function SetFocus()
{
if (document.Login.UserName.value=="")
document.Login.UserName.focus();
else
document.Login.UserName.select();
}

<body onLoad="SetFocus();">