0
這個jQuery選擇工作,我有這個網站:爲什麼在鉻,但不能在Firefox
<div id="PaymentTypeOptions">
<input type="radio" id="payment_Cash" name="PaymentTypeOption" value="1">Cash
<input type="radio" id="payment_Card" name="PaymentTypeOption" value="2">Card
<input type="radio" id="payment_Cheque" name="PaymentTypeOption" value="3">Cheque
<input type="radio" id="payment_Voucher" name="PaymentTypeOption" value="4">Voucher
</div>
,我試圖以使用jQuery將它們綁定到一個事件來選擇所有的輸入類型:
$('document').ready(function() {
$('input:radio[name=PaymentTypeOption]').on('click', function() {
ShowPaymentType(this);
});
});
該選擇器適用於Chrome,但不適用於Firefox。 我很感激爲什麼會這樣。從$('document')
去掉引號後
它在Chrome中如何工作? – 2013-04-23 10:33:08
@JanDvorak我從來沒有在chrome中用引號試過。 – Jai 2013-04-23 10:36:55
這沒有什麼區別。 – tticom 2013-04-23 10:42:58