我想用 Greasemonkey 自动回答问题。我有问题和答案,但如何选择它们?
这是HTML:
<div class="vito_form_q">
<div class="vito_form_title_min_no">
<span id="ContentPlaceHolder1_lblquestionNo">8</span>
</div>
<div class="vito_form_title_min">
<span id="ContentPlaceHolder1_lblquestion">Which sport is not playing with the ball?</span>
</div>
<div class="clearfloat"></div>
<div class="meter orange nostripes"><span style="width: 100%"></span></div>
<div class="quest">
<table id="rbAnswer" class="q1">
<tr><td>
<input id="rbAnswer_0" type="radio" name="ctl00$ContentPlaceHolder1$rbAnswer" value="157"/><label for="rbAnswer_0">Handball</label>
</td></tr>
<tr><td>
<input id="rbAnswer_1" type="radio" name="ctl00$ContentPlaceHolder1$rbAnswer" value="158"/><label for="rbAnswer_1">Basketball</label>
</td></tr>
<tr><td>
<input id="rbAnswer_2" type="radio" name="ctl00$ContentPlaceHolder1$rbAnswer" value="159"/><label for="rbAnswer_2">Football</label>
</td></tr>
<tr><td>
<input id="rbAnswer_3" type="radio" name="ctl00$ContentPlaceHolder1$rbAnswer" value="160"/><label for="rbAnswer_3">Fencing</label>
</td></tr>
例如,对于这个问题:
<span id="ContentPlaceHolder1_lblquestion">Which sport is not playing with the ball?</span>
选择答案:
<td>
<input id="rbAnswer_3" type="radio" name="ctl00$ContentPlaceHolder1$rbAnswer" value="160" />
<label for="rbAnswer_3">Fencing</label>
我怎么能用 Greasemonkey 做到这一点?