JavaScript Reference/Javascript Objects/String — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
Содержание
"String" Example
<source lang="javascript">
<html> <body>
<script language="javascript"> function function1(){
var temp = new String(); temp = myDiv.innerText; alert(temp);
} </script> <button onclick="function1();">String function</button> </body> </html>
</source>
"String" JavaScript Methods
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | JavaScript |anchor big | | Methods |blink bold | | |charAt charCodeAt | | |concat fixed | | |fontColor fontSize | | |fromCharCode indexOf | | |italics lastIndexOf | | |link localeCompare | | |match replace | | |search slice | | |small split | | |strike sub | | |substr substring | | |sup toLocaleLowerCase | | |toLocaleUpperCase toLowerCase | | |toSource toUpperCase | | |valueOf | +----------------+--------------------------------------------------------------+
</source>
"String" JavaScript Properties
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | JavaScript |constructor length | +----------------+--------------------------------------------------------------+
</source>
"String" Syntax and Note
<source lang="javascript">
Note: Manipulate a string.
Syntax:
var stringName = new String("value") // value is any string stringName.memberName
</source>