2012-07-31 109 views

回答

1
$('.delete').click(function() { 
    var name = $(this).closest('tr').find('td').first().text(); 
    var pw = $(this).closest('td').prev().text(); 
    answer = confirm ('Are you sure to remove this item?\n' + name + ' : ' + pw); 
    if (answer) 
    { 
     alert('Removed'); 
    } 
})​; 

http://jsfiddle.net/mm6gF/2/

相關問題