欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Confirmer JQuery確認(rèn)對(duì)話框組件

 更新時(shí)間:2010年06月09日 10:33:27   作者:  
點(diǎn)擊鏈接或按鈕時(shí)要確認(rèn)是否繼續(xù)當(dāng)前操作。

插件截圖:

用途:點(diǎn)擊鏈接或按鈕時(shí)要確認(rèn)是否繼續(xù)當(dāng)前操作。

插件代碼:

復(fù)制代碼 代碼如下:

(function($){
$.fn.confirmer = function(options){
var defaults = {
msg:"Are you sure to delete it ?"
}
var options = $.extend(defaults, options);
var control=$(this);
$(control).click(function(){return confirm(options.msg);});
};
})(jQuery);

用法:
1.$(".delete").confirmer();
2.$(".delete").confirmer({msg:'確認(rèn)刪除嗎?'});
示例:
復(fù)制代碼 代碼如下:

<!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">
<head>
<title>jquery.confirmer.js</title>
  <meta http-equiv="Content-Type" content="text/html; char set=utf-8" />
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.confirmer.js"></script>
<script type="text/javascript">
$().ready(function(){
$(".delete").confirmer();
//$(".delete").confirmer({msg:'確認(rèn)刪除嗎?'});
})
</script>
</head>
<body>
<button id="btnDelete" class="delete">刪除</button>
<a id="lnkDelete" class="delete" >刪除</a>
</body>
</html>

相關(guān)文章

最新評(píng)論