JS插件点击网页上的按钮
2个网页上的按键
<a class="treasureMapPopup-action-button highlight" href="#" onclick="app.views.TreasureMapView.map.toggleTabState('upgradeMap'); return false;">UPGRADE</a>
<a href="#" class="treasureMapPopup-action-button highlight" onclick="app.views.TreasureMapView.map.discard(this); return false;">Leave</a>
我想点击下面这个LAEVE的按键
var poster=document.getElementsByClassName(' ')
;poster[poster.length-1].onclick();
中间(' ') 要填写什么呢 我填写了treasureMapPopup-action-button highlight 效果就是等于按了上面第一行的