lundi 13 octobre 2014

make javascript added by setting innerHTML fire


Vote count:

0




I have a project where I need to run code that is set using innerHTML like so:



element.innerHTML = '<script>alert("something")</script>';


When I do this, the code doesn't run. What can I do to make the code run?


Thank you! If you down vote, please tell me why so I can improve this question.



asked 1 min ago

Progo

820






make javascript added by setting innerHTML fire

Aucun commentaire:

Enregistrer un commentaire