摘要:
JS中的点击按钮herf跳转 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>location对象</title> <script> window.onload = function(){ var bt = document.g 阅读全文
posted @ 2022-05-07 14:01
hi123hi159
阅读(373)
评论(0)
推荐(0)
摘要:
刷新页面 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>location对象</title> <script> window.onload = function(){ var bt1 = document.getElement 阅读全文
posted @ 2022-05-07 13:59
hi123hi159
阅读(167)
评论(0)
推荐(0)
摘要:
图片轮播代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>轮播图</title> <script> var i =1; window.onload = function(){ setInterval("change()", 阅读全文
posted @ 2022-05-07 13:35
hi123hi159
阅读(25)
评论(0)
推荐(0)
摘要:
setTimeout() 在指定的毫秒数后调用函数或计算表达式 clearTimeout() 取消由 setTimeout() 方法设置的 timeout 1 <script> 2 var id; 3 window.onload = function(){ 4 var bt1 = document. 阅读全文
posted @ 2022-05-07 13:07
hi123hi159
阅读(30)
评论(0)
推荐(0)
摘要:
计时器方法 setInterval() 按照指定的周期(以毫秒计)来调用函数或计算表达式 两个参数: 第一个参数:要执行的任务 第二个参数:多长时间(毫秒值) clearInterval() 取消由 setInterval() 设置的 timeout 1 <script> 2 var id; 3 w 阅读全文
posted @ 2022-05-07 12:42
hi123hi159
阅读(94)
评论(0)
推荐(0)
摘要:
open():打开一个新的浏览器窗口 close():关闭浏览器窗口 <script> window.onload = function(){ var bt = document.getElementById("bt"); bt.onclick = function(){ //警告框 alert(" 阅读全文
posted @ 2022-05-07 12:11
hi123hi159
阅读(18)
评论(0)
推荐(0)
摘要:
常见的方法 弹出框方法 alert():警告框 confirm():确认按钮和取消按钮的对话框 prompt():显示可提示用户输入的对话框 1 <script> 2 window.onload = function(){ 3 var bt = document.getElementById("bt 阅读全文
posted @ 2022-05-07 12:09
hi123hi159
阅读(234)
评论(0)
推荐(0)
摘要:
1.BOM 浏览器对象模型 把浏览器的各个组件拆分出来,每一个都封装成一个对象 分哪些部分? Navigator:浏览器对象 Window:浏览器窗口对象 Location:浏览器地址栏对象 History:浏览器历史栏对象 Screen:浏览器参数对象 Document:浏览器文档对象,单独一个, 阅读全文
posted @ 2022-05-07 11:17
hi123hi159
阅读(23)
评论(0)
推荐(0)
摘要:
事件处理(单击事件) 方式一:使用html中的事件属性 1 <script> 2 function aaa(){ 3 alert("欢迎"); 4 } 5 </script> 6 <input type="button" value="点我啊" onclick="aaa()"/> 方式二:使用JS原 阅读全文
posted @ 2022-05-07 10:52
hi123hi159
阅读(196)
评论(0)
推荐(0)
浙公网安备 33010602011771号