mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-28 10:03:04 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<p><code><strong>setMonth()</strong></code> 方法根据本地时间为一个设置年份的日期对象设置月份。</p>
|
||||
<div><iframe class="interactive interactive-js" frameborder="0" height="250" src="https://interactive-examples.mdn.mozilla.net/pages/js/date-setmonth.html" width="100%"></iframe></div>
|
||||
<h2 id="Syntax" name="Syntax">语法</h2>
|
||||
<pre class="syntaxbox"><var>dateObj</var>.setMonth(<em>monthValue</em>[, <em>dayValue</em>])</pre>
|
||||
<pre><code class="language-javascript"><var>dateObj</var>.setMonth(<em>monthValue</em>[, <em>dayValue</em>])</code></pre>
|
||||
<h3 id="Versions_prior_to_JavaScript_1.3" name="Versions_prior_to_JavaScript_1.3">JavaScript 1.3版本之前</h3>
|
||||
<pre class="syntaxbox"><var>dateObj</var>.setMonth(<em>monthValue</em>)</pre>
|
||||
<pre><code class="language-javascript"><var>dateObj</var>.setMonth(<em>monthValue</em>)</code></pre>
|
||||
<h3 id="Parameter" name="Parameter">参数</h3>
|
||||
<dl>
|
||||
<dt><code>monthValue</code></dt>
|
||||
@@ -22,9 +22,9 @@
|
||||
<p>如果有一个指定的参数超出了合理范围,<code>setMonth</code> 会相应地更新日期对象中的日期信息。<font face="Courier New, Andale Mono, monospace">例如,为</font> <code>monthValue</code> 指定 15,则年份会加 1,月份将会使用 3。</p>
|
||||
<h2 id="Examples" name="Examples">例子</h2>
|
||||
<h3 id="Example:_Using_setMonth" name="Example:_Using_setMonth">例子:使用<code>setMonth方法</code></h3>
|
||||
<pre class="brush: js">var theBigDay = new Date();
|
||||
<pre><code class="language-javascript">var theBigDay = new Date();
|
||||
theBigDay.setMonth(6);
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user