上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-05-26 15:04 hi123hi159 阅读(387) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-05-26 14:27 hi123hi159 阅读(65) 评论(0) 推荐(0)
摘要: // 1. setInterval // 语法规范: window.setInterval(调用函数, 延时时间); setInterval(function() { console.log('继续输出'); }, 1000); // 2. setTimeout 延时时间到了,就去调用这个回调函数, 阅读全文
posted @ 2022-05-26 13:37 hi123hi159 阅读(202) 评论(0) 推荐(0)
摘要: var btn = document.querySelector('button'); var timer = setTimeout(function() { console.log('爆炸了'); }, 5000); btn.addEventListener('click', function() 阅读全文
posted @ 2022-05-26 02:38 hi123hi159 阅读(613) 评论(0) 推荐(0)
摘要: // 1. setTimeout // 语法规范: window.setTimeout(调用函数, 延时时间); // 1. 这个window在调用的时候可以省略 // 2. 这个延时时间单位是毫秒 但是可以省略,如果省略默认的是0 // 3. 这个调用函数可以直接写函数 还可以写 函数名 还有一个 阅读全文
posted @ 2022-05-25 20:16 hi123hi159 阅读(465) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-05-25 19:16 hi123hi159 阅读(345) 评论(0) 推荐(0)
摘要: // window.onload = function() { // var btn = document.querySelector('button'); // btn.addEventListener('click', function() { // alert('点击我'); // }) // 阅读全文
posted @ 2022-05-25 18:54 hi123hi159 阅读(211) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-05-25 18:03 hi123hi159 阅读(81) 评论(0) 推荐(0)
摘要: // 核心思路: 检测用户是否按下了s 键,如果按下s 键,就把光标定位到搜索框里面 // 使用键盘事件对象里面的keyCode 判断用户按下的是否是s键 // 搜索框获得焦点: 使用 js 里面的 focus() 方法 var search = document.querySelector('in 阅读全文
posted @ 2022-05-25 17:30 hi123hi159 阅读(59) 评论(0) 推荐(0)
摘要: // 键盘事件对象中的keyCode属性可以得到相应键的ASCII码值 // 1. 我们的keyup 和keydown事件不区分字母大小写 a 和 A 得到的都是65 // 2. 我们的keypress 事件 区分字母大小写 a 97 和 A 得到的是65 document.addEventList 阅读全文
posted @ 2022-05-25 13:40 hi123hi159 阅读(217) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页