Skip to content Skip to sidebar Skip to footer

Createelement() Not Showing Up In View Source

I wrote this script to see how new nodes can be created with createElement(): DOM Traversal

Solution 1:

View source only shows what comes back with the initial http request to the server but it doesn't show the dynamics elements added later.

To those dynamics elements after the initial page load in chrome or other browsers you need to inspect the DOM using the developer toolbar. (In Chrome press F12)

Solution 2:

When you use "view source" normally you see the original response from server, before it has been edited by Javascript.

Are you viewing your "--LOL--" text in the page?

If you want to check the source, you should use F12 tools, which updates content.

Post a Comment for "Createelement() Not Showing Up In View Source"