웹 페이지의 코드는 특정 버튼을 클릭합니다 :어떻게 매 초마다
<div id="content">
<div class="container-fluid">
Slots
<p>The current jackpot is 23220!<p/>
<p>You lose.</p>
<form method=post action=/games/slots.php>
<input type=hidden name='hash_sub' value='MjEzOA=='>
<input type=hidden name='act' value='spin'>
<input type=submit value='Spin again!'>
</form>
<a href='slots.php'>Go Back</a>
</div>
</div>
내 코드 :
setInterval(function solo() {
jQuery('content').children('submit[value="Spin again!"]').click();
}, 1000);
나는, 페이지가로드하지만 버튼을 잃었하지 않도록 것입니다 전혀 클릭되지 않았습니다. 콘솔 로그 오류가 없습니다.
는 사용 jQuery를 ('# 콘텐츠') http://jsfiddle.net/8zj4ez7w/ –