Data The zip file containing the data can be downloaded here: specdata.zip [2.4MB] The zip file contains 332 comma-separated-value (CSV) files containing pollution monitoring data for fine particulate matter (PM) air pollution at 332 locations in the…
test是RegExp的方法,参数是字符串,返回值是boolean类型.match是String的方法,参数是正则表达式,返回值是数组. 案例: //判断日期类型是否为YYYY-MM-DD格式的类型 function IsDate(){ var str = document.getElementById('str').value.trim(); if(str.length!=0){ var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/; var r…
Introduction For this first programming assignment you will write three functions that are meant to interact with dataset that accompanies this assignment. The dataset is contained in a zip file specdata.zip that you can download from the Coursera we…
1.获取日月 时分秒 //获取 月日 getMonth=(time)=>{ var date = new Date(time) <?):(date.getMonth()+) ?'+date.getDate():date.getDate() return month+'-'+date } //获取时分秒 getTime=(time)=>{ var date = new Date(time) ?'+date.getHours():date.getHours() ?'+date.getMinu…