Boa tarde sou novo em Html e javascript
Tenho o código abaixo , um login sem base de dados..ele usa arquivos de texto.
Preciso pegar o nome do usuário digitado quando o login for correto e passar para outra página html ..para verificar se este usuário está logado .
Seria usando o method get? como posso implementar?
Código :
Eu encontrei este código na web ... funciona perfeitamente ... mas não sei implementar no código acima!
<form action="HTML.html" method="GET">
<textarea rows="7" cols="30" name="text"></textarea>
<button type="submit">send</button>
</form>
HTML.html:
<script type="text/javascript">
window.onload = function () {
document.write(window.location.search.split('=')[1]);
};
Tenho o código abaixo , um login sem base de dados..ele usa arquivos de texto.
Preciso pegar o nome do usuário digitado quando o login for correto e passar para outra página html ..para verificar se este usuário está logado .
Seria usando o method get? como posso implementar?
Código :
<script>
function click() {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
document.onmousedown=click
document.oncontextmenu = new Function("return false;")
</script>
<script type="text/javascript">
<!--
function authPass(u,p) {
if (u && p) self.location = "Auth.html?" + u + p;
return false;
}
// -->
</script>
<form id="form1" action="javascript://" onsubmit="return authPass(this.user.value,this.pass.value)"><table>
<tr>
<td>Usuário: </td><td><input type="text" name="user" /></td>
</tr>
<tr>
<td>Senha: </td><td><input type="password" name="pass" /></td>
</tr>
<tr>
<td colspan="4" align="left"><input type="submit" value="Entrar .." /><input name="Lembrar" type="button" onclick="window.open('hhttp://www.portugal-a-programar.pt/')" value="Recuperar a senha" /></td>
</tr>
</table>
</form>
function click() {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
document.onmousedown=click
document.oncontextmenu = new Function("return false;")
</script>
<script type="text/javascript">
<!--
function authPass(u,p) {
if (u && p) self.location = "Auth.html?" + u + p;
return false;
}
// -->
</script>
<form id="form1" action="javascript://" onsubmit="return authPass(this.user.value,this.pass.value)"><table>
<tr>
<td>Usuário: </td><td><input type="text" name="user" /></td>
</tr>
<tr>
<td>Senha: </td><td><input type="password" name="pass" /></td>
</tr>
<tr>
<td colspan="4" align="left"><input type="submit" value="Entrar .." /><input name="Lembrar" type="button" onclick="window.open('hhttp://www.portugal-a-programar.pt/')" value="Recuperar a senha" /></td>
</tr>
</table>
</form>
Eu encontrei este código na web ... funciona perfeitamente ... mas não sei implementar no código acima!
<form action="HTML.html" method="GET">
<textarea rows="7" cols="30" name="text"></textarea>
<button type="submit">send</button>
</form>
HTML.html:
<script type="text/javascript">
window.onload = function () {
document.write(window.location.search.split('=')[1]);
};