1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<!DOCTYPE html> <html> <body> <p>XMLHttpRequest sample </p> <p id="demo">dd</p> <script> function airline(code) { //var decode = code; var xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", "https://code.auctpro.co.kr/airline.php?code=" + code, false ); xmlHttp.send( null ); document.getElementById("demo").innerHTML = xmlHttp.responseText; //decode = xmlHttp.responseText; //return decode; } airline('KE'); </script> </body> </html> |