⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsref_obj_string.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript String Object Reference</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>JavaScript String Object Reference</h1>
<hr />

<h2>String Object Methods</h2>

<p><b>FF</b>: Firefox, <b>N</b>: Netscape, <b>IE</b>: Internet Explorer</p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table8">
  <tr>
    <th width="23%" valign="top" align="left">Method</th>
    <th width="65%" valign="top" align="left">Description</th>
    <th width="4%" valign="top" align="left">FF</th>
    <th width="4%" valign="top" align="left">N</th>
    <th width="4%" valign="top" align="left">IE</th>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_anchor.asp">anchor()</a></td>
    <td valign="top">Creates an HTML anchor</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_big.asp">big()</a></td>
    <td valign="top">Displays a string in a big font</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_blink.asp">blink()</a></td>
    <td valign="top">Displays a blinking string</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_bold.asp">bold()</a></td>
    <td valign="top">Displays a string in bold</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_charAt.asp">charAt()</a></td>
    <td valign="top">Returns the character at a specified position</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_charCodeAt.asp">charCodeAt()</a></td>
    <td valign="top">Returns the Unicode of the character at a specified 
	position</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_concat_string.asp">concat()</a></td>
    <td valign="top">Joins two or more strings</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_fixed.asp">fixed()</a></td>
    <td valign="top">Displays a string as teletype text</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_fontcolor.asp">fontcolor()</a></td>
    <td valign="top">Displays a string in a specified color</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_fontsize.asp">fontsize()</a></td>
    <td valign="top">Displays a string in a specified size</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_fromCharCode.asp">fromCharCode()</a></td>
    <td valign="top">Takes the specified Unicode values and returns a string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_indexOf.asp">indexOf()</a></td>
    <td valign="top">Returns the position of the first occurrence of a specified 
	string value in a string</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_italics.asp">italics()</a></td>
    <td valign="top">Displays a string in italic</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_lastIndexOf.asp">lastIndexOf()</a></td>
    <td valign="top">Returns the position of the last occurrence of a specified 
	string value, searching backwards from the specified position in a string</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_link.asp">link()</a></td>
    <td valign="top">Displays a string as a hyperlink</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_match.asp">match()</a></td>
    <td valign="top">Searches for a specified value in a string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_replace.asp">replace()</a></td>
    <td valign="top">Replaces some characters with some other characters in a 
	string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_search.asp">search()</a></td>
    <td valign="top">Searches a string for a specified value</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_slice_string.asp">slice()</a></td>
    <td valign="top">Extracts a part of a string and returns the extracted part 
	in a new string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_small.asp">small()</a></td>
    <td valign="top">Displays a string in a small font</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_split.asp">split()</a></td>
    <td valign="top">Splits a string into an array of strings</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_strike.asp">strike()</a></td>
    <td valign="top">Displays a string with a strikethrough</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_sub.asp">sub()</a></td>
    <td valign="top">Displays a string as subscript</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_substr.asp">substr()</a></td>
    <td valign="top">Extracts a specified number of characters in a string, from 
	a start index</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_substring.asp">substring()</a></td>
    <td valign="top">Extracts the characters in a string between two specified 
	indices</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_sup.asp">sup()</a></td>
    <td valign="top">Displays a string as superscript</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_toLowerCase.asp">toLowerCase()</a></td>
    <td valign="top">Displays a string in lowercase letters</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a target="_top" href="jsref_toUpperCase.asp">toUpperCase()</a></td>
    <td valign="top">Displays a string in uppercase letters</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_toSource_string.asp">toSource()</a></td>
    <td valign="top">Represents the source code of an object</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">-</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_valueOf_string.asp">valueOf()</a></td>
    <td valign="top">Returns the primitive value of a String object</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">4</td>
  </tr>
  </table>
<br />
<hr />

<h2>String Object Properties</h2>
<table class="ex" cellspacing="0" border="1" width="100%" id="table7">
  <tr>
    <th width="23%" valign="top" align="left">Property</th>
    <th width="65%" valign="top" align="left">Description</th>
    <th width="4%" valign="top" align="left">FF</th>
    <th width="4%" valign="top" align="left">N</th>
    <th width="4%" valign="top" align="left">IE</th>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_constructor_string.asp">constructor</a></td>
    <td valign="top">A reference to the function that created the object</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_length_string.asp">length</a></td>
    <td valign="top">Returns the number of characters in a string</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">3</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_prototype_string.asp">prototype</a></td>
    <td valign="top">Allows you to add properties and methods to the object</td>
    <td valign="top">1</td>
    <td valign="top">2</td>
    <td valign="top">4</td>
  </tr>
</table>
<br />
<hr />

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -