When we use html dom,we normally run code such as :
document.getElementById('id').innerHTML = 'new text'
to change the contents of a tag such as <div>
However I tried this with the <script> tag and it doesn't seem to be working. What should I try?
document.getElementsByTagName('script')[0].innerHTML = "document.write('ok')"