At javascript can i get the source code of a webpage

chippox

Newbie
Joined
Jun 13, 2018
Messages
40
Reaction score
9
At javascript can i get the source code of a webpage ?
If it is possible how can i do ?
Thanks for helping.
 
Yes easy!

HTML:
<script>
$.get("PathToPage", function(result) {
    alert(result)
    //...
});
</script>

source code is the
HTML:
result
variable
 
Back
Top