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()");
}
})();
}