js基础和技巧记录

1、new Date(year, month, 0) 可以表示当前月份的最后一天

2、在一张绿色的图片上使用有奇效哦
-webkit-filter: hue-rotate(-70deg) saturate(1.5);
transition: all 2.5s;

 

3、利用原生的DOMParser 转换获取xml的字符串为dom   

fetch('xxx.xml')
.then(response => response.text())
.then(str => (new window.DOMParser()).parseFromString(str, "text/xml"))
.then(data => console.log(data))

posted @ 2019-02-14 09:29  锦马超  阅读(222)  评论(0)    收藏  举报