📄 two-times.js
字号:
// create a counter variable and a timer variable
var num = 0, tim;
function timeout()
{
num++;
if( num == 3 )
{
alert("OK - I told you twice");
window.clearTimeout( tim ); // cancel the timer
}
else
{
alert("This is 10-Second Message No : " + num );
tim = window.setTimeout( "timeout()" , 10000); } }
timeout();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -