第1个回答 2012-06-28
<html><body>
<h1>标题</h1>
<input type="text" id="username" onmouseout="checkusername()" />
<script language="javascript">
function checkusername()
{
if(document.getelementbyid("username").value=="")
alert("必须输入用户名");
}
</script>
</body></html>