Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita798da0

Browse files
text: Change wording from "cannot" to "should not"
You can use `.text()` on an input, you just shouldn't do this as the behaviormay not be expected.Fixesgh-1244Closesgh-1273
1 parent22f2e65 commita798da0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎entries/text.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<p>
2323
<code>Demonstration Box list item 1 list item 2</code>
2424
</p>
25-
<p>The <code>.text()</code> methodcannot be used on form inputs or scripts. To set or get the text value of <code>input</code> or <code>textarea</code> elements, use the <ahref="/val/"><code>.val()</code></a> method. To get the value of a script element, use the <ahref="/html/"><code>.html()</code></a> method.</p>
25+
<p>The <code>.text()</code> methodshould not be used on form inputs or scripts. To set or get the text value of <code>input</code> or <code>textarea</code> elements, use the <ahref="/val/"><code>.val()</code></a> method. To get the value of a script element, use the <ahref="/html/"><code>.html()</code></a> method.</p>
2626
<p>As of jQuery 1.4, the <code>.text()</code> method returns the value of text and CDATA nodes as well as element nodes.</p>
2727
</longdesc>
2828
<example>
@@ -91,7 +91,7 @@ $( "p" ).last().html( str );
9191
<pre><code>
9292
&lt;p&gt;This is a test&lt;/p&gt;
9393
</code></pre>
94-
<p>The <code>.text()</code> methodcannot be used on input elements. For input field text, use the <ahref="/val/">.val()</a> method.</p>
94+
<p>The <code>.text()</code> methodshould not be used on input elements. For input field text, use the <ahref="/val/">.val()</a> method.</p>
9595
<p>As of jQuery 1.4, the <code>.text()</code> method allows us to set the text content by passing in a function.</p>
9696
<pre><code>
9797
$( "ul li" ).text(function( index ) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp