0

我在 chrome 控制台中使用 click 功能时遇到问题。

我正在使用以下内容:

document.getElementById('example').click();

并且仅当我检查元素时才有效,之后元素(示例)为null.

我只能通过再次检查元素来重新加载它。

有没有办法重新加载元素并确保它不为空?基本上,我希望它每 1 分钟自动点击一次。

代码如下所示:

<a href="javascript:void(0)" class="th-bt th-bt-text" onclick="thBtMgr.click(this);return htmlbSL(this,2,'example:Go','0')" onmousedown="thBtMgr.press(this,event);" onfocusout="thBtMgr.unpress(this);" onfocus="thSaveKbFocus(this);" oncontextmenu="return false;" ondragstart="return false;" id="example"> 
   <span class="th-bt-span">
      <b class="th-bt-b">Go</b>
   </span>
</a>

在此先感谢您的帮助。

4

0 回答 0