【问题标题】:Google chrome Version 72.0.3626.81 bug or code error?Google chrome 版本 72.0.3626.81 错误或代码错误?
【发布时间】:2019-02-04 11:02:00
【问题描述】:

我的 Google chrome 版本 72.0.3626.81 不工作,但当我使用版本 71 时它可以工作。

如何进行以下工作?

<img src="abcd/720p.jpg" usemap="map_sync" id="spmain">
<map name="map_sync" class="maps" id="map_sync">
        <area shape="rect" coords="225, 214, 1053, 298" nohref="" onclick="eid();">       
        <area shape="rect" coords="224, 319, 1052, 403" nohref="" onclick="no_eid();">                     
      </map>

没有任何 javascript 方法在 72 稳定版上执行,但在 71 上它可以工作。我重新测试了对齐方式,地图对齐方式也正确。

是BUG还是代码问题?

【问题讨论】:

  • 是否有任何控制台错误?
  • NO - 控制台错误,通过输入#修复它
  • 在版本 71 中,我不需要输入 #
  • 你具体在哪里放了 # ?
  • 失败 72 - $('#spmain').attr('usemap', 'map_sync')。作品 72 - 失败 - $('#spmain').attr('usemap', '#map_sync');

标签: javascript html google-chrome chromium


【解决方案1】:

在谷歌浏览器 72 中

FAIL 72 - $('#spmain').attr('usemap', 'map_sync');
WORKS 72 - $('#spmain').attr('usemap', '#map_sync');

【讨论】:

    【解决方案2】:

    在地图名称中添加 # 对我来说很有效。

    这就是 Jsf (Primefaces) 的样子

    <p:commandLink rendered="#{user.calendar}" 
        oncomplete="PF('planningBoxDialog').show();" >
        <p:graphicImage
            value="#{appointment.planning.streamedContent}"
            id="streamedContent"
            cache="FALSE" usemap="#indicatorMap">
        </p:graphicImage>
    </p:commandLink>
    <map name="#indicatorMap">
        <area coords="0,0,10,10"
              title="#{appointment.planning.planningBoxTooltipTopLeft}"
                      onclick="rc_planning();"/>
        <area coords="10,0,20,10"
              title="#{appointment.planning.planningBoxTooltipTopRight}"
              onclick="rc_planning();"/>
        <area coords="0,10,10,20"
              title="#{appointment.planning.planningBoxTooltipBottomLeft}"
              onclick="rc_planning();"/>
        <area coords="10,10,20,20"
              title="#{appointment.planning.planningBoxTooltipBottomRight}"
              onclick="rc_planning();"/>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-20
      • 2019-08-27
      • 1970-01-01
      • 2020-07-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多