演示地址: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>
jConfirmAction Demo示例展示
博客给出了jConfirmAction Demo的演示地址和代码。代码中包含XHTML文档声明,引入了jQuery库及相关脚本,通过JavaScript实现不同确认框效果,如普通确认框和自定义语言确认框,还给出了原文地址。

2403

被折叠的 条评论
为什么被折叠?



