3

I have a site I'm loading via iframe and it's on the same server. I need to remove a certain script tag before the page inside the iframe is loaded. In order words, intercept and remove the script before it's executed.

I tried

var x = doc.getElementsByTagName('script');
doc.getElementsByTagName('head').removeChild(x);

But this doesn't seem to be able to catch the script before it executes. What other methods or options exist to achieve this objective?

Thanks

4

2 に答える 2

0
<script type="text/plain">
    alert('foo')
</script>
于 2013-02-14T16:48:35.203 に答える