2010-06-15 314 views

回答

3

我需要這 甚至在頁面加載完畢 必須自動按一下按鈕 並移動到下一個頁面的Greasemonkey腳本。

使用Greasemonkey,您目前只能在頁面加載完成之前的DOM就緒狀態下運行用戶腳本。

通過在Google Chrome上使用的用戶腳本,他們可以更快運行,並且最終您可以在DOM準備好之前運行userscript。

至於代碼選擇並點擊該按鈕:

document.evaluate("//input[@value='new' and @type='submit' and contains(@class, 'button')]", document, null, 9, null).singleNodeValue.click(); 

應該做的伎倆

+0

嘿,我需要的Greasemonkey腳本,我會在Firefox上運行它。在頁面加載完成之前,按鈕是否被點擊並不重要。謝謝。 – technocrat 2010-06-16 05:15:40

+0

那麼,只需將上面的代碼放入.user.js文件並添加一個[元數據塊](http://wiki.greasespot.net/Metadata_Block),然後將其拖放到Firefox中,安裝並且應該可以工作。 – erikvold 2010-06-16 05:32:18

+0

我已經這樣做了,但代碼沒有工作..你可以幫我用greasemonkey腳本代碼。 – technocrat 2010-06-17 14:20:58