摘要: 要求:在网页中显示当前时间 预览效果: 思路: y:year 年 M:Month 月 d:day 日 h:hours 小时 (h(12小时)/H(24小时)) m:minutes 分钟 s:seconds 秒钟 源码: let h1 = document.querySelector("h1"); s 阅读全文
posted @ 2021-09-22 18:40 博客zhu虎康 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 预览: 源码: let box = document.querySelector(".box"); box.ontouchstart = function (){ console.log("start"); } box.ontouchend = function (){ console.log("e 阅读全文
posted @ 2021-09-22 15:23 博客zhu虎康 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 预览: 源码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>事件类型</title> <style> .box{ width: 200px; height: 200px; background-color 阅读全文
posted @ 2021-09-22 12:02 博客zhu虎康 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 预览: 源码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>鼠标事件</title> <style> .box{ width: 200px; height: 200px; background-color 阅读全文
posted @ 2021-09-22 11:59 博客zhu虎康 阅读(46) 评论(0) 推荐(0) 编辑