<html>
<head>
<script type="text/javascript">
function setFocus()
{
document.getElementById('password1').focus()
}
function loseFocus()
{
document.getElementById('password1').blur()
}
</script>
</head>
<body>
<form>
<input type="password" id="password1" value="thgrt456" />
<input type="button" value="Set focus" />
<input type="button" value="Lose focus" />
</form>
</body>
</html>
这是参考文档中的例子,可是并没有看到加了焦点和取消焦点有什么区别,求指教!
|