我正在制作一个片段,人们可以将其添加到他们的网站中。我的问题是它调用了 Internet Explorer 顶部的黄色“ActiveX”栏。我不确定是什么调用了它。这是我的代码:
<a id="nhl1" href="http://www.theaddress.com/">link</a>
<script type="text/javascript">
(function () { document.getElementById('nhl1').innerHTML =
'<img src="http://www.theaddress.com/banner1.jpg" alt="image 1" style="border: none;" />'; })();
</script>
最佳答案
如果您在本地计算机中运行页面,则当页面上有脚本时就会发生这种情况。实际消息是:
To help protext your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options...
[强调我的]
如果您在网络服务器上运行相同的页面,您将不会看到黄色警告栏。
关于javascript - 用图像替换文本会调用 "IE has restricted this page from running scripts or ActiveX",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3013275/