承接上篇获取当地日期,这篇写获取日期。
纯无聊,手写代码如下,
function getDate(){
this.currentDate = new Date();
this.year = currentDate.getFullYear();
this.month = currentDate.getMonth() + 1;
this.day = currentDate.getDate();
currentDate = [];
currentDate.push(this.year);
currentDate.push(this.month);
currentDate.push(this.day);
document.write(this.currentDate.join("-"));
}
getDate();
测试结果:
chrome/firefox/opera/safari/ie11/ie10:2017-7-6;
也就是说,ie678都不支持。
但是是不是我选用的测试工具不行?以上使用的是ietester;
我换用一下微软自己开发的super preview
测试ie67都可以。
现在问题来了?这个结果到底准不准呢?大牛们都是怎么测试兼容性的呢?
4万+




被折叠的 条评论
为什么被折叠?



