473,473 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

javascript to html

Is there any tool available that can output html that corresponds to a page rendered by a
javascript website?

For example, here is a page rendered in javascript:

http://www.michigan-football.com/s/2005/fb05.htm

I'd like to have an html file that would look basically the same.

Thanks.
Sep 1 '05 #1
3 2662
Ken Massey wrote:
Is there any tool available that can output html that corresponds to a
page rendered by a javascript website?

For example, here is a page rendered in javascript:

http://www.michigan-football.com/s/2005/fb05.htm

I'd like to have an html file that would look basically the same.

Thanks.


1. Create a bookmark/favorite

2. Change the url to the following (please excuse wrapping, it should be
one continuous line):

javascript:'<code><ol><li>'+(document.documentElem ent ||
document.body).innerHTML.replace(/&/g,%22&amp;%22).replace(/</g,
%22&lt;%22).replace(/%20%20/g, %22&nbsp;%20%22).replace(/\n/g,
%22<li>%22)+'<\/ol><\/code>';

To see the page's HTML, select the bookmark. If you don't want the faux
line numbers, use:

javascript:'<code>'+(document.documentElement ||
document.body).innerHTML.replace(/&/g,%22&amp;%22).replace(/</g,
%22&lt;%22).replace(/%20%20/g, %22&nbsp;%20%22).replace(/\n/g,
%22<br>%22)+'<\/code>';

--
Rob
Sep 1 '05 #2
Thanks. That's a neat trick. Any ideas how to do it without a browser, e.g. via wget/curl and
a standalone interpreter like spidermonkey's js ?

RobG wrote:
Ken Massey wrote:
Is there any tool available that can output html that corresponds to a
page rendered by a javascript website?

For example, here is a page rendered in javascript:

http://www.michigan-football.com/s/2005/fb05.htm

I'd like to have an html file that would look basically the same.

Thanks.

1. Create a bookmark/favorite

2. Change the url to the following (please excuse wrapping, it should be
one continuous line):

javascript:'<code><ol><li>'+(document.documentElem ent ||
document.body).innerHTML.replace(/&/g,%22&amp;%22).replace(/</g,
%22&lt;%22).replace(/%20%20/g, %22&nbsp;%20%22).replace(/\n/g,
%22<li>%22)+'<\/ol><\/code>';

To see the page's HTML, select the bookmark. If you don't want the faux
line numbers, use:

javascript:'<code>'+(document.documentElement ||
document.body).innerHTML.replace(/&/g,%22&amp;%22).replace(/</g,
%22&lt;%22).replace(/%20%20/g, %22&nbsp;%20%22).replace(/\n/g,
%22<br>%22)+'<\/code>';

Sep 1 '05 #3
Ken Massey <km*****@masseyratings.com> writes:
Is there any tool available that can output html that corresponds to a
page rendered by a javascript website?


Try entering the following in the address bar:

javascript:document.body.innerHTML.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\n/g,"<br>")

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Sep 1 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.