Question: I have a `<div id="content">`. I want to load the content from <http://vietduc24h.com> into my `div`: 

```
<html>
<head>
<script type="text/javascript">
    $(document).ready(function()
    {
        $("#content").attr("src","http://vietduc24h.com");
    })
</script>
</head>
<body>
    <div id="content"></div>
</body>
</html

```

I don't want to use an iframe. How can I do this?

Answer: 
You need to think about CORS in this aspect. The code you need to have is:

```
<script type="text/javascript">
    $(document).ready(function()
    {
        $("#content").load("http://vietduc24h.com");
    })
</script>

```

When your domain is not inside `vietduc24h.com`, you might get some security exception. In order to avoid that, you can host a local proxy here. In PHP, we do this way (`url.php`):

```
<?php
    $url = file_get_contents(urlencode($_GET["url"]));
    echo $url;
?>

```

And in the script, you need to modify this way:

```
<script type="text/javascript">
    $(document).ready(function()
    {
        $("#content").load("proxy.php?url=http://vietduc24h.com");
    })
</script>

```
Try this:

```
  $("#content").html('<object data="http://vietduc24h.com">');

```

Taken from [this answer](https://stackoverflow.com/a/9964050/646668).