我正在使用 Jconfirm 和 Jquery 来制作一个确认框。
问题是 .submit 不起作用
Javascript
$('#delete').submit(function(e) {
e.preventDefault();
jConfirm("Are you sure you want to delete this link?", "Confirmation", function(r) {
if (r) { $('#delete').submit(); }
});
$('#delete').submit(); 似乎已经死了。
HTML
<form action="bla.php" method="post" accept-charset="utf-8" id="delete">
<table>
<tr>
<td><label for="category">Category:</label></td><td><select name="category_id" id="categories">
<option value="1">test</option>
<option value="#" selected="selected">Please select</option>
</select></td>
</tr>
<tr>
<td><label for="links">Link:</label></td><td width="400"><select name="link_id" id="links">
<option value="#" selected="selected">Please select</option>
</select></td>
</tr>
<tr>
<td></td><td><input type="submit" value="Delete" ></td>
</tr>
</table>
</form>