【问题标题】:onclick do not work IE11 (Windows 2016 server)onclick IE11 不起作用(Windows 2016 服务器)
【发布时间】:2017-09-13 01:52:43
【问题描述】:

我是网络开发的新手,如果我在问题中遗漏了什么,请告诉我。

鉴于 JS 代码在 IE 11(Windows 2016 Server)上无法运行,它在其他浏览器上运行良好,并在我的屏幕上提醒我。

<div class="col-xs-3 text-center">
  <a class="my_env_template dashboard-link" onclick="alert(123)">
    <span class="fa fa-2x dashboard-icon fa-clone" id="env_pref" aria-hidden="true"></span><br> Open Templates
  </a>
</div>

预期:我希望屏幕上出现警报。

请注意,我使用默认设置运行 Windows 2016 服务器和 IE,我没有更改任何服务器或浏览器配置。

【问题讨论】:

  • 控制台错误?
  • 控制台没有错误:(
  • 检查 javascript 是否在 ie 中启用。 whatismybrowser.com/guides/how-to-enable-javascript/…
  • 试试这个:onclick="alert(123);return false;"
  • @AravindSivam ...非常感谢...您节省了我的时间...现在正在运行...

标签: javascript


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    • 2017-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多