Dec
6
It was somewhat difficult to figure out a good title for this topic as it's a "Script that will take your HTML and automatically convert it into JavaScript calls to insert it into your HTML using DOM methods"...yeah, that's a rather long title. I'm sure I didn't word it as well as the script's author did in his blog post. The idea is somewhat interesting, and the way to create the DOM model from the HTML is ironic, as the author put it.
He first uses innerHTML to insert the actual HTML into a test "area"; he then uses the DOM to traverse that test area in order to come up with the appropriate JavaScript calls to create the elements. I think it's geniously idiotic to work it like that, and best of all it works really well! He seemed just as surprised to come up with the idea.
Enjoy the "DOMTool"!
He first uses innerHTML to insert the actual HTML into a test "area"; he then uses the DOM to traverse that test area in order to come up with the appropriate JavaScript calls to create the elements. I think it's geniously idiotic to work it like that, and best of all it works really well! He seemed just as surprised to come up with the idea.
Enjoy the "DOMTool"!


0 Trackbacks