Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
JavaScript
function url1()
{
    window.location.assign("http://www.example.com")
}


First i want to navigate this website for calling url1() method, after page load completed whole page text with tags are store in one variable....plz tell me the solution...

Thank's in advance.....
Posted

You can try the following

var strHTML=document.documentElement.innerHTML;
 
Share this answer
 
Comments
Bhoraniya Saalim 14-Nov-14 23:14pm    
But how i get or see the data that store in strHTML variable
Bhoraniya Saalim 14-Nov-14 23:16pm    
my code is...
function navi()
{
window.location="http://www.eurotier.com/exhibitor_db.html";
var strHTML = document.documentElement.innerHTML;
}
I don't know your specific scenario,but to display the value of the variable you can use alert
alert(strHTML);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900