I\'ve got a script that inserts some content into an element using innerHTML
.
The content could for example be:
You should not use the innerHTML property but rather the appendChild method of the Node: a node in a document tree [HTML DOM]. This way you are able to later call your injected code.
Make sure that you understand that node.innerHTML
is not the same as node.appendChild
. You might want to spend some time on the Javascript Client Reference for more details and the DOM. Hope the following helps...
Sample injection works:
test
some content
regards