zoukankan
html css js c++ java
JS控制按钮10秒钟后才能正常使用
设置10秒后按钮显示有效状态
<
script
language
="javascript"
>
function
start()
{
document.getElementById(
"
Button1
"
).disabled
=
true
;
document.getElementById(
"
Button1
"
).value
=
10
;
window.setTimeout(
"
tick()
"
,
1000
);
}
function
tick()
{
var
time
=
new
Number(document.getElementById(
"
Button1
"
).value);
if
(time
>
0
)
{
document.getElementById(
"
Button1
"
).value
=
time
-
1
;
window.setTimeout(
"
tick()
"
,
1000
);
}
else
{
document.getElementById(
"
Button1
"
).disabled
=
false
;
document.getElementById(
"
Button1
"
).value
=
"
保存
"
;
}
}
</
script
>
<
form
>
<
asp:button
id
="Button1"
runat
="server"
Text
="Button"
></
asp:button
>
</
form
>
<
script
language
=javascript
>
start();
</
script
>
查看全文
相关阅读:
30 Day Challenge Day 12 | Leetcode 198. House Robber
30 Day Challenge Day 12 | Leetcode 276. Paint Fence
30 Day Challenge Day 12 | Leetcode 265. Paint House II
30 Day Challenge Day 12 | Leetcode 256. Paint House
30 Day Challenge Day 11 | Leetcode 76. Minimum Window Substring
30 Day Challenge Day 11 | Leetcode 66. Plus One
oracle之6过滤与排序
oracle之5多行函数之过滤分组函数
oracle之4多行函数之分组函数
oracle之3单行函数之条件表达式
原文地址:https://www.cnblogs.com/hanguoji/p/596562.html
最新文章
【oacle】Oracle中的Temporary tablespace的作用
【oracle】oracle参数FAILED_LOGIN_ATTEMPTS
【oracle】清空user的数据库对象
【oracle】oracle 调试 存储过程
Cracer 之内网渗透
Cracer之后渗透攻击
Cracer之Linux提权
Cracer之getshell方法与Windows提权总结
Smb(445)暴力破解与利用(实操)
破解wifi(物理黑客)
热门文章
网络安全资源整理
30 Day Challenge Day 14 | Leetcode 39. Combination Sum
30 Day Challenge Day 14 | Leetcode 77. Combinations
30 Day Challenge Day 13 | Leetcode 401. Binary Watch
30 Day Challenge Day 13 | Leetcode 980. Unique Paths III
30 Day Challenge Day 13 | Leetcode 63. Unique Paths II
30 Day Challenge Day 13 | Leetcode 62. Unique Paths
30 Day Challenge Day 12 | Leetcode 746. Min Cost Climbing Stairs
30 Day Challenge Day 12 | Leetcode 70. Climbing Stairs
30 Day Challenge Day 12 | Leetcode 213. House Robber II
Copyright © 2011-2022 走看看