Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script>
  4. function nuevoAjax(){
  5. var xmlhttp=false;
  6. try {
  7. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  8. } catch (e) {
  9. try {
  10. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  11. } catch (E) {
  12. xmlhttp = false;
  13. }
  14. }
  15.  
  16. if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  17. xmlhttp = new XMLHttpRequest();
  18. }
  19. return xmlhttp;
  20. }
  21.  
  22. function cargarContenido(){
  23. var t1, t2, contenedor;
  24. contenedor = document.getElementById('contenido');
  25. t1 = document.getElementById('senha1').value;
  26. t2 = document.getElementById('senha2').value;
  27. ajax=nuevoAjax();
  28. ajax.open("GET", "Retorna_ajax.php?t1="+t1+"&t2="+t2,true);
  29. ajax.onreadystatechange=function() {
  30. if (ajax.readyState==4) {
  31. contenedor.innerHTML=ajax.responseText;
  32.  
  33. }
  34. }
  35. ajax.send(null)
  36. }
  37.  
  38.  
  39. </script>
  40. </head>
  41. <body>
  42.  
  43.  
  44.  
  45. <hr width="50%" align="tr">
  46. <table border="0" width="23%" borderColor="purple" align="center">
  47. <caption><font color="#800080">Verifica Senha</font></caption>
  48. <tr>
  49. <td><font color="#404000">Senha</font>:</td>
  50. <td><input type="password" value="" id="senha1"></td>
  51. </tr>
  52. <tr>
  53. <td><font color="#404000">Confirm Senha</font>:</td>
  54. <td><input type="password" value="" id="senha2" onBlur=cargarContenido()></td>
  55. </tr>
  56.  
  57. </table>
  58. <table border="0" width="23%" align="center">
  59. <tr>
  60. <td><p id="contenido"></p></td>
  61. </tr>
  62. </table>
  63.  
  64. <hr width="50%" align="tr">
  65.  
  66.  
  67.  
  68. </body>
  69. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement