JS, date is a built-in data type, although the direct output of the date format for people to read, but for the machine program is a bit inconvenient:
var now=New Date (); Console.log (now); // Wed Nov 22:02:17 gmt+0800 (China Standard Time)
How to convert to a convenient way to operate the JS program? It's simple just precede the new keyword with a +:
var now=+New Date (); Console.log (now); // 1448460291345
JavaScript Errors:
Https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
Try{foo.bar ();}Catch(e) {if(Einstanceofevalerror) {Alert (E.name+ ': ' +e.message); } Else if(Einstanceofrangeerror) {Alert (E.name+ ': ' +e.message); } Else if(Einstanceofinternalerror) {Alert (E.name+ ': ' +e.message); }Else if(Einstanceofreferenceerror) {Alert (E.name+ ': ' +e.message); }Else if(Einstanceofsyntaxerror) {Alert (E.name+ ': ' +e.message); }Else if(EinstanceofTypeError) {Alert (E.name+ ': ' +e.message); }Else if(Einstanceofurierror) {Alert (E.name+ ': ' +e.message); } //... etc}
JavaScript tips and Snippets