getCurrentDate
来源:互联网 发布:svg js设置 transform 编辑:程序博客网 时间:2024/06/06 10:39
承接上篇获取当地日期,这篇写获取日期。
纯无聊,手写代码如下,
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都可以。
现在问题来了?这个结果到底准不准呢?大牛们都是怎么测试兼容性的呢?
阅读全文
0 0
- getCurrentDate
- Cesium学习笔记(一)添加实体
- 动态计算UITableViewCell高度详解
- C# FTP下载文件夹到本地
- scrollView嵌套webview+listview listview显示不全 上拉listview加载更多
- Xcode 6视图调试
- getCurrentDate
- Android中通过Intent传递对象、集合问题
- Android-完美解决在Activity中触摸返回键onBackPressed不能触发问题
- GCD使用经验与技巧浅谈
- IFeatureLayerDefinition接口查询要素图层方法汇总
- 802.11协议下,分组从发送到接收的全过程(信道到物理层到MAC层传输过程)
- iOS a/framewortk/bundle 教程
- Ubuntu 16.04 + GTX1080ti + CUDA8.0 + cudnn5.1 + tensorflow
- IDC脚本语言概述