我想插入數據到表格中時,複選框被選中,並刪除數據表格時,複選框未取消檢查ia使用此ajax代碼..是否有任何事件會滅火時複選框改變複選框uncheked插入數據到表格複選框檢查使用ajax更改
代碼:
<script type="text/javascript">
$(function() {
//$(".tb11").click(function(){
$(document).on('click', '.clUname', function(event)
{
//Save the link in a variable called element
var element = $(this);
var table = $('#selecttable').val();
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
//var info = 'id=' + del_id,'&selecttable=' + table
if(confirm("Are You Sure You Want Delete This Record."))
{
$.ajax({
type: "POST",
url: "DeletePropertyGalleryData.php",
data:
{
id: del_id ,selecttable: table
},
success: function(){
}
});
}
return false;
});
});
</script>
搜索在谷歌事件複選框.. –
我搜查,但沒有得到你用'的意思的任何解決方案 – dvirus
沒得到任何solution'。複製粘貼上面的評論給了我十幾個結果。查看此https://www.google.co.in/search?q=checkbox+events&rlz=1C1AVNC_enIN561IN561&oq=checkbox+events&aqs=chrome..69i57&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8#es_sm=122&espv=210&newwindow=1&q = checkbox + events + jquery –