Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <input id="c" type="text" onkeypress="processar()">
- <p id="p1">Resultado:</p>
- <script>
- function processar() {
- var xhttp;
- xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- var f1 = this.readyState == 4;
- var f2 = this.status == 200;
- if (f1 && f2) {
- var p = document.getElementById('p1');
- p1.innerHTML = this.responseText;
- }
- };
- var k = document.getElementById('c');
- var digitado = k.value;
- var url = "bua.php?paulo=" + digitado;
- xhttp.open("GET", url, true);
- xhttp.send();
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement