2022年4月29日
摘要: <script type="text/javascript"> window.onload = function() { //获取图片 var img1 = document.getElementById('img1'); //把图放在一个数组里面 var imgArr = ["img/1.jpg" 阅读全文
posted @ 2022-04-29 17:30 crush丶凡子 阅读(52) 评论(0) 推荐(0) 编辑
2022年4月28日
摘要: <style type="text/css"> #box1{ width: 100px; height: 100px; background-color: red; position: absolute; } </style> <script type="text/javascript"> //使d 阅读全文
posted @ 2022-04-28 17:12 crush丶凡子 阅读(31) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="box1"></div> <div id="box2"></div> </body> <style type="text/css"> #box1 { width: 100px; height: 100px; background-color: red; positio 阅读全文
posted @ 2022-04-28 16:01 crush丶凡子 阅读(45) 评论(0) 推荐(0) 编辑
2022年4月27日
摘要: 使用 对象.事件 = 函数 的形式绑定响应函数, * 它只能同时为一个元素的一个事件绑定一个响应函数, * 不能绑定多个,如果绑定了多个,则后边会覆盖掉前边的 addEventListener() * - 通过这个方法也可以为元素绑定响应函数 * - 参数: * 1.事件的字符串,不要on * 2. 阅读全文
posted @ 2022-04-27 16:57 crush丶凡子 阅读(20) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #box1{ width: 100px; height: 100px; background-color: red 阅读全文
posted @ 2022-04-27 14:54 crush丶凡子 阅读(71) 评论(0) 推荐(0) 编辑
2022年4月8日
摘要: <style> * { margin: 0; padding: 0; } li { list-style-type: none; } a { text-decoration: none; font-size: 14px; } .nav { margin: 100px; } .nav>li { pos 阅读全文
posted @ 2022-04-08 17:50 crush丶凡子 阅读(16) 评论(0) 推荐(0) 编辑
2022年3月29日
摘要: <script> var cbAll = document.getElementById('j_cbAll') //全选按钮 var jtb = document.getElementById('j_tb').getElementsByTagName('input'); //单选按钮 cbAll.o 阅读全文
posted @ 2022-03-29 17:49 crush丶凡子 阅读(39) 评论(0) 推荐(0) 编辑