我想知道如何防止多次提示确认消息,在此先感谢!
javascript
$('img.delete').click(function () {
if(confirm("This selected record will be deleted. Are you sure?")){
//Do something...
}
});
html
<tbody>
<tr>
<td><img class="delete" src="/images/delete.gif"><input value="708" type="hidden"></td>
<td>aaa</td>
</tr>
<tr>
<td><img class="delete" src="/images/delete.gif"><input value="595" type="hidden"></td>
<td>bbb</td>
</tr>
<tr>
<td><img class="delete" src="/images/delete.gif"><input value="19" type="hidden"></td>
<td>ccc</td>
</tr>
</tbody>