整理出来以前自己积累的代码,需要的时候可以拿来用。天下武功,唯快不破。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <script language="javascript"> <!--// /*This Script allows people to enter by using a form that asks for a UserID and Password*/ function pasuser(form) { if (form.id.value=="username") { if (form.pass.value=="password") { location="page2.html" } else { alert("Invalid Password") } } else { alert("Invalid UserID") } } //--> </script> <center> <table bgcolor="white" cellpadding="12" border="1"> <tr><td colspan="2"><center><h1><i><b>Login Area</b></i></h1></center></td></tr> <tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input name="id" type="text"></td></tr> <tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass" type="password"></td></tr> <tr><td><center><input type="button" value="Login" onClick="pasuser(this.form)"></center></td><td><center><br><input type="Reset"></form></td></tr></table></center> <body> </body> </html>
时间: 2024-10-18 08:51:02