Last active
August 29, 2015 14:07
-
-
Save RdlP/47d1bd8390a529c5c6f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a onClick="var http=new XMLHttpRequest();var pass=prompt('Introduzca la contraseña');var params=JSON.stringify({pass: pass, resource:0});http.open('POST','validate.php', true);http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){var json = JSON.parse(http.responseText);if(json.error == false){window.location = json.url;}else{alert('La contraseña no es correcta')}}};http.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');http.send(params);" href='#'>Link</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment