2019年1月25日
摘要:
JS中出现的兼容性问题的总结1.关于获取行外样式 currentStyle 和 getComputedStyle 出现的兼容性问题 我们都知道js通过style不可以获取行外样式,当我们需要获取行外样式时: 我们一般通过这两个方法获取行外样式: IE下: currentStyle Chrome,FF
阅读全文
posted @ 2019-01-25 19:17
猛兽
阅读(473)
推荐(1)
摘要:
智能社javascript基础题测试姓名:________目前学过的获取元素的方式有哪些?并说出是通过什么获取的?获取出来几个?Answer:Document.getElementById();获取一个;Document.getELementsByTagName()//获取多个;Document.g
阅读全文
posted @ 2019-01-25 19:02
猛兽
阅读(541)
推荐(0)
2019年1月9日
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> li { margin-right: 4px; list-style: none; width: 50px; heigh
阅读全文
posted @ 2019-01-09 10:58
猛兽
阅读(287)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> function rnd(n, m) {//随机数: n - m之间,包含n 不包含m; return parseIn
阅读全文
posted @ 2019-01-09 10:01
猛兽
阅读(508)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> function rnd(n, m) { return parseInt(Math.random() * (m - n
阅读全文
posted @ 2019-01-09 09:57
猛兽
阅读(419)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <SCRIPT> alert(Math.min(5,2,3));//取较小的值 alert(Math.max(1,2,3));//取较大
阅读全文
posted @ 2019-01-09 09:56
猛兽
阅读(158)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> function fn(){ var n = 0; function m(){ n += 1; console.log
阅读全文
posted @ 2019-01-09 09:55
猛兽
阅读(221)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> //将字符串转换成驼峰命名方式. //示例: var str = 'border-left-color'; > bor
阅读全文
posted @ 2019-01-09 09:54
猛兽
阅读(1974)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><script> //封装一个函数, 求数组的和. //实例: console.log( sum([1, 2,
阅读全文
posted @ 2019-01-09 09:12
猛兽
阅读(755)
推荐(0)
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><script> //.封装函数, 在数组 arr 中,查找值与 item 相等的元素出现的所有位置. //示例
阅读全文
posted @ 2019-01-09 09:11
猛兽
阅读(528)
推荐(0)