diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html index 17608a744f..4bbfc8ad23 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html @@ -27,12 +27,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate <h3 id="Example:_Using_getDate" name="Example:_Using_getDate">例子: 使用getDate()<code>方法</code></h3> -<p>下面第二条语句将值25赋给 day 变量,该值<span style="line-height: 1.5;">基于日期对象 </span><code style="font-style: normal; line-height: 1.5;">Xmax95</code><span style="line-height: 1.5;">的值。</span></p> +<p>下面第二条语句将值25赋给 day 变量,该值基于日期对象 <code style="font-style: normal; line-height: 1.5;">Xmax95</code>的值。</p> -<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:00"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span> -<span class="keyword token" style="color: #0077aa;">var</span> day <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getDate<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span> +<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:00"); +var day = Xmas95.getDate(); -<span class="function token">alert<span class="punctuation token" style="color: #999999;">(</span></span>day<span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span><span class="comment token" style="color: #708090; display: inherit;"> // 25</span></code></pre> +alert(day); // 25</code></pre> <h2 id="规范" style="margin-bottom: 20px; line-height: 30px;">规范</h2> |