limitar acceso a usuarios
Publicado por francisco (1 intervención) el 23/02/2010 03:03:12
resuta q tengo este codigo quiero sabre como modificarlo para agregarle mas usuarios y pra cuando ponga una contraseña incorrecta q salga un cartel
aca el codigo
html>
<head>
<script language="javascript">
<!--
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var auth = "http://" +username + ":" + password + "@" + server;
window.location = auth;
}
else {
alert("Enter your username and password.");
}
}
//-->
</script>
</head>
<body bgcolor="#ffffff">
<form name=login>
<input type="hidden" name="server" value="www.google.com/">
<table border="0" width="200">
<tr><td width="75">Username:</td>
<td width="75"><input type=text name=username size=10></td></tr>
<tr><td width="75">Password:</td>
<td width="75"><input type=password name=password size=10></td></tr>
<tr><td width="75"></td>
<td width="75">
<input type=button value="Login" onClick="Login(this.form)" name="button">
</td></tr>
</table>
</form>
</body>
</html>
graciass
aca el codigo
html>
<head>
<script language="javascript">
<!--
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var auth = "http://" +username + ":" + password + "@" + server;
window.location = auth;
}
else {
alert("Enter your username and password.");
}
}
//-->
</script>
</head>
<body bgcolor="#ffffff">
<form name=login>
<input type="hidden" name="server" value="www.google.com/">
<table border="0" width="200">
<tr><td width="75">Username:</td>
<td width="75"><input type=text name=username size=10></td></tr>
<tr><td width="75">Password:</td>
<td width="75"><input type=password name=password size=10></td></tr>
<tr><td width="75"></td>
<td width="75">
<input type=button value="Login" onClick="Login(this.form)" name="button">
</td></tr>
</table>
</form>
</body>
</html>
graciass
Valora esta pregunta
0