![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
Accessing the Raw html text
Hi again all! ^_^
Does anybody out there know how to access the html on the page and covert it into a raw string? when i do something like: alert(document) It just prints out [object HTMLDocument] or something along those lines, depending on the browser. However, I want it to be the raw html text. Any ideas? Thanks again! ^_^ |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
You can print the body i believe, using:
alert(document.body.innerHTML); I don't know how to print the header, though. |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 122
Rep Power: 3
![]() |
alert(document.getElementsByTagName('html')[0].innerHTML);
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet" |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
Awsome! ^_^ Thanks again guys!
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|