Copy code code as follows:
function newdate (str) {str = str.split ('-');
var date = new date ();
date.SetutCFullyear (str [0], str [1] -1, str [2]);
Date.SetutChours (0, 0, 0, 0);
Return date;
}
Therefore, in order to ensure compatibility in each browser, in fact, it means that for compatibility of IE, it is best to use it uniformly when using the Date () object
New date (year, mN, day, hour, minute, sec, millsec)
or
New Date (Millsec) (Millsec is the milliseconds from January 1, 1970).
The result returned when IE under IE ("" Date Text "") is a special date object, but the IE debugger shows it as nan.