You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the following map to trigger the specified DOM item clicked. but failed
while it works when execute the same code in console by pressing F12, why?
var a = document.getElementsByClassName("icon aui-icon aui-icon-small aui-iconfont-editor-list-number")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to use the following map to trigger the specified DOM item clicked. but failed
while it works when execute the same code in console by pressing F12, why?
var a = document.getElementsByClassName("icon aui-icon aui-icon-small aui-iconfont-editor-list-number")
imapkey('', "#confluence list-number", function() {
alert("xxx1")
var a = document.getElementsByClassName("icon aui-icon aui-icon-small aui-iconfont-editor-list-number")
alert(a)
alert(a.length)
if(a.length) {
alert("xxx2")
a[0].click();
}
});
Beta Was this translation helpful? Give feedback.
All reactions