javascript - How to make a Userscript that Automatically clicks on a Button when it appears -


the button need script click setup this:

<div id="closer" style="visibility: visible;">     <input style="height:32px" type="button" onclick="javascript:showit('hide');" value="click here return adventurequest"> </div> 

the thing can't figure out how reference button variable, since button has no id getelementbyid() won't work. think in order reference button need reference <div> element somehow.

your question confusing.. need selector find button? $('#closer>input[type=button]') ...

and in question title clicks on button automatically? trigger click on it:

$('#closer>input[type=button]').trigger('click');  

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -