2011-09-26 60 views

回答

0

如果你正在使用jQuery你可以有一個撤銷鏈接,看起來像這樣:

<a href="#" class="undo">undo</a> 

$(document).ready(){ function(){ //wait until the page has loaded 
    $(".undo").click(function(){  //bind to the click event of your undo link 
    $(".checkbox").attr('checked', !$(".checkbox").attr('checked')) // Toggle the checkbox 
    }) 
}) 

當然,這是假設你只有一個複選框。您需要更多地瞭解您當前的設置,以瞭解您希望用戶體驗如何去。