<!-- 把下列代码加到<body>区域中 -->
<script language="JavaScript">
<!--
function validform(){
if (document.login.LoginName.value == ""){
document.login.LoginName.focus();
alert ("注意:请输入用户名!");
return false;
}
if (document.login.passwd.value == "")
{
document.login.passwd.focus();
alert ("注意:请输入密码!");
return false;
}
if (document.login.selectway.value=="count"){
document.login.action="count.asp";
}
if (document.login.selectway.value=="guestbook"){
document.login.action="guestbook.asp";
}
}
//-->
</script>
<form method=post name="login" onSubmit="return validform();">
<input type="text" name="LoginName" size="8" value="用户名" onMouseOver="this.focus()" onMouseOut="if(this.value=='')this.value='用户名';" onFocus="this.select()" onClick="if(this.value=='用户名')this.value=''">
<input type="password" name="passwd" size="8" value="******" onMouseOver="this.focus()" onMouseOut="if(this.value=='')this.value='******';" onFocus="this.select()" onClick="if(this.value=='******')this.value=''">
<select name="selectway">
<option value="count" selected>免费计数器</option>
<option value="guestbook">免费留言板</option>
</select>
<input type=submit value="提交" name="submit">
</form>