开发者

Does Button.click() stop script execution?

开发者 https://www.devze.com 2023-02-12 07:14 出处:网络
I have some code that I paste into the browser that clicks several buttons. After the first one it stops, but if I keep pressing enter in the address bar it eventually clicks them all but it only work

I have some code that I paste into the browser that clicks several buttons. After the first one it stops, but if I keep pressing enter in the address bar it eventually clicks them all but it only works one by one.

Does Button.click() stop script execution?

var buttons = document.getElementsByTagName('butto开发者_开发技巧n'); 
for(var i in buttons) 
{
   if(buttons[i].getAttribute("title") == "Get Car Quote") 
   {
      buttons[i].click();
   }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号