简体   繁体   中英

fire the .click() event of this undetectable element without JQuery

I'm searching a way to fire up click event of this tag :

    <input src="GN/button_go.gif" alt="Go" align="absmiddle" border="0" type="image">

using java-script and not using JQuery selectors. this has NO Id or Name or something else to identified by selectors. what do you affer?

您可以使用document.querySelector做到这一点

document.querySelector("[src='GN/button_go.gif']").click();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM