jq页面加载完后按钮延迟5s才能点击
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
charset
=
"UTF-8"
>
<
title
>按钮倒数5秒后才能点击</
title
>
</
head
>
<
script
src
=
"http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
></
script
>
<
body
>
<
button
type
=
"button"
id
=
"test"
disabled>点击</
button
>
</
body
>
<
script
type
=
"text/javascript"
>
setTimeout(function(){
$("button[id='test']").removeAttr("disabled");
},5000)
</
script
>
</
html
>