<script language=javascript>
var time_end;
function playsound()
{
document.Mysound.play();
timer=setTimeout("playsound()",1);
}
function settime()
{
var now=new Date();
var hour=now.getHours();
var minute=now.getMinutes()
//var second=now.getSeconds()
frm.t3.value=hour+":"+minute;
time_id=setTimeout("settime()",1000)
return frm.t3.value
}
function set_time()
{
time_end=frm.t1.value+":"+frm.t2.value;
if(time_end==settime())
{
playsound();
}
timer=setTimeout("set_time()",1);
}
</script>
<body onload=settime()>
<embed
SRC="file:///c:/sod.wav"
HIDDEN=TRUE
NAME="Mysound"
AUTOSTART=FALSE
MASTERSOUND>
<a href="javascript:playsound()">dsdsd</a>
<p><form name=frm>
<input type=text name=t3><br>
<input type=text name=t1 size=2 > :
<input type=text name=t2 size=2 >
<input type=button name=b1 value="定时" onclick=set_time()>
</form>
</body>
var time_end;
function playsound()
{
document.Mysound.play();
timer=setTimeout("playsound()",1);
}
function settime()
{
var now=new Date();
var hour=now.getHours();
var minute=now.getMinutes()
//var second=now.getSeconds()
frm.t3.value=hour+":"+minute;
time_id=setTimeout("settime()",1000)
return frm.t3.value
}
function set_time()
{
time_end=frm.t1.value+":"+frm.t2.value;
if(time_end==settime())
{
playsound();
}
timer=setTimeout("set_time()",1);
}
</script>
<body onload=settime()>
<embed
SRC="file:///c:/sod.wav"
HIDDEN=TRUE
NAME="Mysound"
AUTOSTART=FALSE
MASTERSOUND>
<a href="javascript:playsound()">dsdsd</a>
<p><form name=frm>
<input type=text name=t3><br>
<input type=text name=t1 size=2 > :
<input type=text name=t2 size=2 >
<input type=button name=b1 value="定时" onclick=set_time()>
</form>
</body>
解决方案 »
- prototype.js开发问题
- js下载
- 有没有办法点击按钮,复制网页上的图片到剪贴板?
- 关于复选框问题!
- [100分求助]简单网页记数问题
- 利用循环给数组赋值,为什么不对?
- 如何将http://fason.nease.net/code/js/other/htmleditor.htm页面中的textarea中的源码加入到数据库
- 这个正则表达式怎么起不了作用
- jquery求一款图片集展示插件
- 商城购物车的问题,一个的知道咋写,多个就蒙了~!
- 如何在javascript中获取Img src?
- 怎么设置让COOKIE失效,有的朋友说把失效时间设置为当前时间就可以了吗?怎么设置啊?有没有相关的资料啊?有代码最好了!!谢谢了
timer=setTimeout("set_time()",1000);
在设一个按钮“不要吵了” 点击后停止即可