2012-08-06

Get source code of a webpage using jQuery

With the help of below jQuery snippet, we can get the source code of a particular webpage.

<script type="text/javascript">
    var url = "test.html";

    $.get(url, function (data) {
        alert("Page Source: " + data);
    });
</script>

No comments: