when i am loading a web page using the code window.location
. I want to get the text inside the paragraph. when i using the below code i didn't get the answer. How to get the contents of web page when using window.location. The page loading is working successfully. But the content is not getting proper.
$(function(){
window.location="http://xxxxxxxxx/";
var x = document.getElementsByTagName("p");
console.log(x[0]);
}
The output is showing undefined
. I didn't get the correct answer. Is it possible please help me.