上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 35 下一页
摘要: <script> var div = document.querySelector('div'); div.onclick = function() { this.style.backgroundColor = 'purple'; this.style.width = '250px'; } </sc 阅读全文
posted @ 2020-06-05 17:03 EricBlog 阅读(181) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-06-05 16:47 EricBlog 阅读(433) 评论(0) 推荐(0) 编辑
摘要: <button id="ldh">刘德华</button> <button id="zxy">张学友</button> <br> <img src="images/ldh.jpg" alt="" title="刘德华"> <script> // 修改元素属性 var ldh = document.g 阅读全文
posted @ 2020-06-05 15:45 EricBlog 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-05 15:03 EricBlog 阅读(112) 评论(0) 推荐(0) 编辑
摘要: var times = document.getElementById('time'); // 第一种 var lis = document.getElementsByTagName('li'); console.log(lis); // [li, li, li, li, li, li, li] / 阅读全文
posted @ 2020-06-05 14:47 EricBlog 阅读(98) 评论(0) 推荐(0) 编辑
摘要: // 返回字符串位置 str.inidexOf('要查找的字符',[起始的位置]) // var str = '改革春风吹满地,春天来了'; // console.log(str.indexOf('春')); // 2 // console.log(str.i var str = 'abcoefox 阅读全文
posted @ 2020-06-05 13:35 EricBlog 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 检测是否为数组 var arr = []; console.log(arr instanceof Array); // true console.log(Array.isArray(arr)); // true // 数组排序 // 1数组翻转 var arr = ['pink', 'red', ' 阅读全文
posted @ 2020-06-05 10:51 EricBlog 阅读(114) 评论(0) 推荐(0) 编辑
摘要: <script> function countDown(time) { var nowTime = +new Date(); // 返回当前时间总的毫秒数 var inpuTime = +new Date(time); // 返回用户输入时间总的毫秒数 var times = (inpuTime - 阅读全文
posted @ 2020-06-04 22:05 EricBlog 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-04 21:03 EricBlog 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-04 20:26 EricBlog 阅读(61) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 35 下一页