- 严格模式下dom的style属性为只读,当直接赋值时在某些平台如ios会报错,
例:document.body.style = 'width: 100%';
报错:TypeError: Attempted to assign to readonly property
document.body.style = 'width: 100%';
TypeError: Attempted to assign to readonly property
本文标题:use strict
本文链接:https://www.haomeiwen.com/subject/lefbittx.html
网友评论