mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-20 02:05:48 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div><iframe class="interactive interactive-js" frameborder="0" height="250" src="https://interactive-examples.mdn.mozilla.net/pages/js/date-setdate.html" width="100%"></iframe></div>
|
||||
<p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a class="external" href="https://github.com/mdn/interactive-examples" rel="noopener">https://github.com/mdn/interactive-examples</a> and send us a pull request.</p>
|
||||
<h2 id="Syntax" name="Syntax">语法</h2>
|
||||
<pre class="syntaxbox"><code><var>dateObj</var>.setDate(<em>dayValue</em>)</code></pre>
|
||||
<pre><code class="language-javascript"><code><var>dateObj</var>.setDate(<em>dayValue</em>)</code></code></pre>
|
||||
<h3 id="Parameters" name="Parameters">参数</h3>
|
||||
<dl>
|
||||
<dt><code>dayValue</code></dt>
|
||||
@@ -14,9 +14,9 @@
|
||||
<p>如果 <code>dayValue</code> 超出了月份的合理范围,<code>setDate</code> 将会相应地更新 <code>Date</code> 对象。例如,如果为 <code>dayValue</code> 指定0,那么日期就会被设置为上个月的最后一天。</p>
|
||||
<h2 id="Examples" name="Examples">例子</h2>
|
||||
<h3 id="Example:_Using_setDate" name="Example:_Using_setDate">例子:使用<code>setDate</code>方法</h3>
|
||||
<pre class="brush:js">var theBigDay = new Date(1962, 6, 7); // 1962-07-07
|
||||
<pre><code class="language-js">var theBigDay = new Date(1962, 6, 7); // 1962-07-07
|
||||
theBigDay.setDate(24); // 1962-07-24
|
||||
theBigDay.setDate(32); // 1962-08-01</pre>
|
||||
theBigDay.setDate(32); // 1962-08-01</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user