Laman

Manual Javascript load another page

<div id="load"></div>
<script>
var client = new XMLHttpRequest();
client.open('GET', 'http://<yourweb>/contentpage.php');
client.onreadystatechange = function() {
    document.getElementById('dtservices').innerHTML=(client.responseText);
}
client.send();
</script>

In another host page set <?php header("Access-Control-Allow-Origin: *");?>

No comments:

Post a Comment

Silahkan