<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>禁用</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
<input type="text">
<input type="button" value="同意" class="btn">
<script>
var second=10;
var intervalId;
$(function(){
$(".btn").attr("disabled",true);
intervalId=setInterval("timer()",1000);
})
function timer(){
if(second<=0){
$(".btn").val("同意");
$(".btn").attr("disable",false);
clearInterval(intervalId);
return;
}
second--;
$(".btn").val("请仔细阅读"+second+"秒");
}
</script>
</body>
</html>