html: <a><span id="sendAgain" onclick="sendEmail()">2.再次發送激活郵件</span></a> (span控制點擊事件,disabled無效) js: /*發送郵件*/function sendEmail(){//發送郵箱認證郵件 var me = ...
html:
<a><span id="sendAgain" onclick="sendEmail()">2.再次發送激活郵件</span></a>
(span控制點擊事件,disabled無效)
js:
/*發送郵件*/
function sendEmail(){//發送郵箱認證郵件
var me = $("#sendAgain");
me.time = 60;
(function() {
if (me.time > 1) {
me.time--;
me.html("2.再次發送還需(" + me.time + ")");
setTimeout(arguments.callee, 1000);
me.attr("onclick","");
} else {
me.html("2.再次發送激活郵件");
me.attr("onclick","sendEmail()");
}
})();
}