语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -4,7 +4,7 @@
</div></div>
<p>getYear() 方法返回指定的本地日期的年份。因为 <code>getYear</code> 不返回千禧年[full years] ("year 2000 problem"),所以这个方法不再被使用,现在替换为 <a href="Reference/Global_Objects/Date/getFullYear" title="getFullYear() 方法根据本地时间返回指定日期的年份。"><code>getFullYear</code></a> .</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox"><code>dateObj.getYear() </code></pre>
<pre><code class="language-javascript"><code>dateObj.getYear() </code></code></pre>
<h3 id="Parameters" name="Parameters">Parameters</h3>
<p>None.</p>
<h3 id="Description" name="Description">Returns</h3>
@@ -25,24 +25,24 @@
<h2 id="Examples" name="Examples">Examples</h2>
<h3 id="Example:_Years_between_1900_and_1999" name="Example:_Years_between_1900_and_1999">Example: Years between 1900 and 1999</h3>
<p>The second statement assigns the value 95 to the variable <code>year</code>.</p>
<pre class="brush:js">var Xmas = new Date("December 25, 1995 23:15:00");
<pre><code class="language-js">var Xmas = new Date("December 25, 1995 23:15:00");
var year = Xmas.getYear(); // returns 95
</pre>
</code></pre>
<h3 id="Example:_Years_above_1999" name="Example:_Years_above_1999">Example: Years above 1999</h3>
<p>The second statement assigns the value 100 to the variable <code>year</code>.</p>
<pre class="brush:js">var Xmas = new Date("December 25, 2000 23:15:00");
<pre><code class="language-js">var Xmas = new Date("December 25, 2000 23:15:00");
var year = Xmas.getYear(); // returns 100
</pre>
</code></pre>
<h3 id="Example:_Years_below_1900" name="Example:_Years_below_1900">Example: Years below 1900</h3>
<p>The second statement assigns the value -100 to the variable <code>year</code>.</p>
<pre class="brush:js">var Xmas = new Date("December 25, 1800 23:15:00");
<pre><code class="language-js">var Xmas = new Date("December 25, 1800 23:15:00");
var year = Xmas.getYear(); // returns -100
</pre>
</code></pre>
<h3 id="Example:_Setting_and_getting_a_year_between_1900_and_1999" name="Example:_Setting_and_getting_a_year_between_1900_and_1999">Example: Setting and getting a year between 1900 and 1999</h3>
<p>The second statement assigns the value 95 to the variable <code>year</code>, representing the year 1995.</p>
<pre class="brush:js">var Xmas.setYear(95);
<pre><code class="language-js">var Xmas.setYear(95);
var year = Xmas.getYear(); // returns 95
</pre>
</code></pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>