您的位置:首页 > Web前端 > JavaScript

漂亮的js删除确认提示框

2010-10-18 18:58 218 查看



演示地址:http://www.corange.cn/demo/3697/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>jConfirmAction Demo</title>
<link rel="stylesheet" type="text/css" media="screen, projection" href="demo.css" />
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("jquery", "1.2.6");
</script>
<script type="text/javascript" src="js/order.js"></script>
<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">

$(document).ready(function() {

$('.ask-plain').click(function(e) {

e.preventDefault();
thisHref = $(this).attr('href');

if(confirm('Are you sure')) {
window.location = thisHref;
}

});

$('.ask-custom').jConfirmAction({question : "Anda Yakin?", yesAnswer : "Ya", cancelAnswer : "Tidak"});
$('.ask').jConfirmAction();
});

</script>
</head>
<body>
<span class="title"></span>
<br/><br/>
<div id="container">
<label>没有用本例效果</label>
: <a href="delete.html" class="ask-plain">Delete Me</a>
<hr/>
<label>Using Plugin With Default Confirmation</label>
: <a href="delete.html" class="ask">Delete Me</a>
<hr/>
<label>Customized Language (Indonesian) </label>
: <a href="delete.html" class="ask-custom"><img src="images/trash.png" border="0" align="absbottom" /></a>
</div>
</body>
</html>

原文地址:http://www.corange.cn/archives/2010/10/3697.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: