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
>
查看全文
相关阅读:
LeetCode 1
Thinking in Java学习杂记(第7章)
工程优化部分概念
Thinking in Java学习杂记(5-6章)
Thinking in Java学习杂记(1-4章)
python中map()和dict()的用法
JavaWeb高级编程(下篇)
对CSDN的理性吐槽
CSDN博客已经打不开了
大连交大教务一键教学评价
原文地址:https://www.cnblogs.com/hanguoji/p/596562.html
最新文章
Facebook币Libra学习-3.小试牛刀第一笔交易
Facebook币Libra学习-2.交易生命周期
Facebook币Libra学习-1.核心概念
以太坊Geth通过私钥导入新地址到钱包步骤(3种方法)
以太坊Geth通过私钥导入新地址到钱包步骤
比特币数据目录
如何测本地的接口
oracle的批量插入sql
刷完了leetcode的数据库题目~
自学数据库建模工具--powerdesigner
热门文章
sql中的if()和ifnull() 的用法和区别
linux
跨域问题
五个常见问题,带你从心理学的视角重新理解
40个java多线程问题总结
atom的初次尝试,activate-power-mode 插件和做gif
内容索引
使用FreeSurfer进行脑区分割
热力图与原始图像融合
使用Python进行XML解析
Copyright © 2011-2022 走看看