mobileTech
mobileTech copied to clipboard
iphone中new Date('2016-09-01 19:00:00')错误
iphone中new Date('2016-09-01 19:00:00')会报Invalid Date错误, 必须写成new Date('2016/09/01 19:00:00'),
谢谢!我把他补充进去
这个格式,pc下ie也是不行的,一般都是 yyyy/MM/dd 格式,横线格式要避开
严格说是:ie<=8的时候,会报[date] NaN错误
ios中如下代码无效: dom.style="width:100px;height:100px;" 必须写成: dom.style.width=100+"px"; dom.style.height=100+"px";
window,和移动端判断横竖屏问题: var angle = 0; try { angle = window.screen.orientation.angle } catch (e) { angle =window.orientation } Math.abs(angle) === 90//横屏
iphone中new Date('2016-09-01 19:00:00') 这个问题是不是可以直接归纳为Date.prase()方法的浏览器兼容性问题?
必须写成new Date('2016/09/01 19:00:00')