k_k_grass
发贴: 29
积分: 0
|
于 2003-06-08 00:41
以下是代码: <html> <head> <title> login </title>
</head> <body bgcolor="#ffffff">
<form name="form1">
<br><br> 用户名:<input type="text" name="userName"><br> 密码:<input type="password" name="password"><br> <input type="submit" name="Submit" value="Submit" onClick='checkInput()'> <script language="javascript"> <!-- function checkInput(){ if(form1.userName.Value==" ") { alert("请输入登陆信息!"); window.form1.userName.focus(); return; } else if(form1.password.Value==" ") { alert("请输入口令!"); window.form1.password.focus(); return; } form1.submit(); } --> </script> <input type="reset" value="Reset"> </form> </body> </html>
|