我有一個其中有jQuery的:內嵌的onclick
<input type="radio" name="shipment" value="1" onclick="if (this.checked) $('#total').html(2);" style="display: none; ">
和A元素
<a class="shipment">shipment</a>
和jQuery代碼onclick事件
$('.shipment').live('click', function() {
$(this).prev('input[type="radio"]').click(); // input field is checked, but onclick not working
}
如何調用一個INPUT在線腳本輸入?
我猜一類/ id屬性缺少你的輸入控件.. – Misam 2012-07-24 12:15:35
使用:'onclick =「if(this.checked)document.getElementById('total')。innerHTML ='2';」 style =「display:none;」和「on('click')' – 2012-07-24 12:30:30