雾观远山

博客园 首页 新随笔 联系 订阅 管理

2021年12月5日 #

摘要: <audio autoplay="autoplay"> <source src="sample.mp3" type="audio/mp3"/> <source src="sample.ogg" type="audio/ogg"/> </audio> 阅读全文
posted @ 2021-12-05 16:40 雾观远山 阅读(593) 评论(0) 推荐(0)

摘要: <script>function hello(){alert("hello");}//重复执行某个方法var t1 = window.setInterval(hello,1000);var t2 = window.setInterval("hello()",3000);//去掉定时器的方法windo 阅读全文
posted @ 2021-12-05 16:37 雾观远山 阅读(82) 评论(0) 推荐(0)

摘要: 定时器:用以指定在一段特定的时间后执行某段程序。 JS中定时执行,setTimeout和setInterval的区别,以及l解除方法 setTimeout(Expression,DelayTime),在DelayTime过后,将执行一次Expression,setTimeout 运用在延迟一段时间, 阅读全文
posted @ 2021-12-05 16:36 雾观远山 阅读(142) 评论(0) 推荐(0)

摘要: 以下代码1000毫秒执行一次(其实就是一秒)<html> <body> <input type="text" id="clock" /> <script type="text/javascript"> var int=self.setInterval("clock()",1000); functio 阅读全文
posted @ 2021-12-05 16:35 雾观远山 阅读(52) 评论(0) 推荐(0)