問(wèn)題描述
我正在嘗試使用 Chrome 控制臺(tái)選擇頁(yè)面中的所有按鈕并以編程方式單擊它們.與我正在玩的頁(yè)面類(lèi)似的頁(yè)面是:http://api.openstack.org/api-ref.html#compute-ext
I'm trying to use the Chrome console to select all the buttons in a page and click them programmatically. A similar page to what I'm playing with is this one: http://api.openstack.org/api-ref.html#compute-ext
我已經(jīng)嘗試執(zhí)行下面的命令,但它沒(méi)有達(dá)到我想要的效果.
I already tried to execute the command below but it didn't do what I wanted.
$("btn small info").click()
這可能嗎?我應(yīng)該發(fā)出什么命令?
Is this possible at all? What command should I issue?
推薦答案
好吧,您要確保只選擇該部分中的按鈕,這樣您就不會(huì)運(yùn)行搜索.
Well, you want to make sure you only select the buttons in the section so you are not running the search.
$("#body .btn").trigger("click");
這篇關(guān)于以編程方式單擊 Chrome 控制臺(tái)中頁(yè)面上的所有按鈕的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!