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
However I tried this with the
<script> tag and it doesn’t seem to be working. What should I try?
document.getElementsByTagName('script').innerHTML = "document.write('ok')"