<a href="https://www.baidu.com" onClick="return confirmJump();"><a>
<script>
function confirmJump(){
$("-sharpjumpModal").modal("toggle");
return false;
//
}
</script>
Update
I have a table that shows no records, and then each record has an action button (delete), which needs to be linked to a url.
<td>
<a href="/delete/1/" role="button" class="btn btn-danger"></a>
</td>
The id above will change because there are multiple records.
A simple implementation is as follows:
<td>
<a href="/delete/1/" role="button" class="btn btn-danger" onclick="return confirm("");"></a>
</td>
now I just think that the confirm dialog box doesn"t match my web page style, so I want to replace it with bootstrap"s modal box.
this is a method, but I don"t know if it"s relatively best.
what he does is add the herf attribute of the record I selected to the href attribute of the a tag on modal.