编辑没有 ID 的 HTML 属性

问题描述

你好,我有这个代码

<div class="ic-app-header__logomark-container">
          <a href="https://iusd.instructure.com/" class="ic-app-header__logomark __web-inspector-hide-shortcut__">
            <span class="screenreader-only">Dashboard</span>
          </a>
        </div>

我想将 href 修改为 javascript:void(0) 我怎么能只用类和名称来做到这一点,我必须使用
.ic-app-header__logomark 或其他什么?

此外,我正在使用电子将代码注入外部站点,并且只能在一个 js 文件中访问 c​​ss 和 javascript。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)