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