ios js Date 时间对象问题
发表于|更新于|js
不支持以构造函数传入时间的字符串
以下写法移动端不兼容
1 | var stringTime = "2014-07-10 10:21:12"; |
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2018-10-20
laya layaair webaudio h5 ios 微信 电流声 爆音 滋滋声 解决办法
经过大量测试使用layaair开发的H5经常遇到IOS声音异常的问题,也不是全部设备 原因在调用Laya.init时,引擎也顺便初始化了webaudio,并且不能关闭,到最新的1.7.20版本,声音的问题尚未修复即使调用Laya.SoundManager.useAudioMusic = true 使用声音标签播放,依然有这个问题而且webaudio也无法关闭 只要new了webaudio,那些ios设备就一定会出现爆音 解决办法在初始化之前,删除webaudio对象 1window.AudioContext= window.AudioContext=window.webkitAudioContext = window.mozAudioContext = null
2017-08-08
js 设置和获取锚点
window.location.hash
2017-07-10
常用 js ts 函数
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186// js版explodefunction explode(inputstring, sepa...
2017-07-20
js 获取 url地址信息
协议 不含 “//”location.protocol主机名location.hostname;
2020-05-05
js 浅拷贝 vue 多层 数据 不更新
vue感觉对他的data中的数据浅拷贝赋值才会更新所以类似 123var list = app.listlist['newkey'] = 1app.list = list 这种是不会更新的 可以使用浅拷贝https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/assign 1Object.assign(new , old) 写成 12var list = Object.assign({},app.list )app.list = list 这样就会更新了
2015-09-27
js获取选中的一段字符串并加标签
function surroundContent() { var r; if (document.selection) { r = document.selection.createRange(); if (r.text != '') r.pasteHTML('' + r.text + '') } else if (window.getSelection) { r = window.getSelection(); if (r.rangeCount > 0) { r = r.getRangeAt(0); var a = document.createElement('a'); a.href = '#'; r.surroundContents(a) r.collaps...
公告
This is my Blog