Last week in the collation of a previously written calendar script, FF under the annual display is always a problem, make a depressed s. For example, the following script: under IE hint "2007"-No Problem! But under the FF is prompted "107"?
<script> var today = new Date (); Alert (Today.getyear ()); </script>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Google a bit, just understand in the FF getyear return is "Current year-1900" value (Legend has been this way before), and NB of Ms but when the year>=2000, directly minus 1900 added back. Hehe, again admire IE's fault tolerant ability and magnanimous ^_^
The most direct solution is Year = (Year < 1900)? (1900 + year): year;
Of course you have to judge browser type classification processing is also no problem.
The most reasonable is to use the getyear getFullYear or getutcfullyear to call, you can change the code box above to see the results.