摘要:
<script type="text/javascript"> window.onload = function() { //获取图片 var img1 = document.getElementById('img1'); //把图放在一个数组里面 var imgArr = ["img/1.jpg" 阅读全文
摘要:
<style type="text/css"> #box1{ width: 100px; height: 100px; background-color: red; position: absolute; } </style> <script type="text/javascript"> //使d 阅读全文
摘要:
<body> <div id="box1"></div> <div id="box2"></div> </body> <style type="text/css"> #box1 { width: 100px; height: 100px; background-color: red; positio 阅读全文
摘要:
使用 对象.事件 = 函数 的形式绑定响应函数, * 它只能同时为一个元素的一个事件绑定一个响应函数, * 不能绑定多个,如果绑定了多个,则后边会覆盖掉前边的 addEventListener() * - 通过这个方法也可以为元素绑定响应函数 * - 参数: * 1.事件的字符串,不要on * 2. 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #box1{ width: 100px; height: 100px; background-color: red 阅读全文
摘要:
<style> * { margin: 0; padding: 0; } li { list-style-type: none; } a { text-decoration: none; font-size: 14px; } .nav { margin: 100px; } .nav>li { pos 阅读全文
摘要:
<script> var cbAll = document.getElementById('j_cbAll') //全选按钮 var jtb = document.getElementById('j_tb').getElementsByTagName('input'); //单选按钮 cbAll.o 阅读全文