-2

can my page Javascript read same page which itself is loaded? Like other parts of page are dynamically loaded by other provider. I have tried many things, google as well, but now I am in doubt that it is posible. Or it is.

Thank You!

4

2 回答 2

1

If the page has loaded and the javascript you are running is client-side (which it should be), you should be able to access everything on the page via the document object. I would advise reading about the DOM to familiarise yourself with this.

EDIT: removed link

于 2013-07-12T08:40:29.300 回答
0

Server side code (whether written in JavaScript or otherwise) is not capable of determining the final rendering of the page in the user's browser.

You could build the entire page yourself (and you could use a headless browser, like PhantomJS, to do it) but that could give different results to a visitor's as you would have a different set of cookies, a different source IP address, and so on.

于 2013-07-12T08:37:12.503 回答