<script> var xhr= new XMLHttpRequest(); xhr.onreadystatechange= function(){ if(xhr.readyState === 4){ document.getElementById('ajax').innerHTML= xhr.responseText; } }; xhr.open('POST','x.php'); function startAjax(){ xhr.send(); document.getElementById('hide_button').style.display= 'none'; } </script> <body> <button id='hide_button' onclick='startAjax()'>Start</button> <div id='ajax'></div> </body>
<script> alert('js is executed'); </script> <h1>Radom text</h1>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)