|
22 | 22 | <p> |
23 | 23 | <code>Demonstration Box list item 1 list item 2</code> |
24 | 24 | </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> |
26 | 26 | <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> |
27 | 27 | </longdesc> |
28 | 28 | <example> |
@@ -91,7 +91,7 @@ $( "p" ).last().html( str ); |
91 | 91 | <pre><code> |
92 | 92 | <p>This is a test</p> |
93 | 93 | </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> |
95 | 95 | <p>As of jQuery 1.4, the <code>.text()</code> method allows us to set the text content by passing in a function.</p> |
96 | 96 | <pre><code> |
97 | 97 | $( "ul li" ).text(function( index ) { |
|