例:2018-12-28 15:00:00 1. var newDate = new Date("2018-12-28 15:00:00") 这种获取的时间在安卓手机上显示是正常的,在苹果手机上显示NaN 2. var newDate = new Date("2018/12/28 15:00:00") 这种获取的时间在安卓和苹果手机上都显示正常 3. 转换时间格式 .replace(/\-/g, "/") var newD
随着3G和Wifi的推广,越来越多的Android应用程序需要调用网络资源,检测网络连接状态也就成为网络应用程序所必备的功能. Android平台提供了ConnectivityManager 类,用于网络连接状态的检测. Android开发文档这样描述ConnectivityManager 的作用: Class that answers queries about the state of network connectivity. It also notifies applications