JavaScript
(1)页面有一个按钮button id为 button1,通过原生的js如何禁用?(IE 考虑IE 8.0以上版本)
解析:
document.getElementById("button1").disabled = true或
document.getElementById("button1").setAttribute("disabled","true")
(2)(function() { var a = b = 5; })(); console.log(b); console.log(a);的输出结果为?
解析:5,Uncaught ReferenceError:a is not defined
(3)关于跨域问题下面说法正确的是?
解析:通过iframe设置document.domain可以实现跨域。
https://juejin.im/post/5d70c7f46fb9a06afb61eac5
(4)可继承的样式属性包括?
color、font-size
注:不包括background-color、border、margin
解析:CSS中可以和不可以继承的属性