0
當一個複選框被選中時,我想提交表單。不過,我需要包含在我的提交按鈕中的參數成爲請求的一部分。jQuery的提交表單與事件變化的按鈕
這段腳本提交表單,但沒有使用按鈕。我猜是因爲jquery以其他方式提交。
$(e.target).find("input[type='radio']").attr("checked", true)
$(".edit_booking").submit()
我試圖指向了jQuery包含PARAMS的按鈕,通過它的ID,並使用一個click事件,但是這也不管用。
$(e.target).find("input[type='radio']").attr("checked", true)
$("#bookings_next").click()
位的形式爲:
<form novalidate="novalidate" class="simple_form edit_booking" id="edit_booking_9486" action="/venues/plymouth/bookings/9486" accept-charset="UTF-8" method="post">
.............
<input type="submit" name="forward_button" value="Next step" id="bookings_next" />
非常感謝