国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

??? ??? ??

??? ??? ??

(1) ???? ??

???? ??? ???? ??? ??? ??? ????. ??? ?? ??? ??? ??? ?? ?:

var test_var = "I love You!";
document.write(test_var.length);

? ??? ??? ??? ??? ????? ??? "11"? ?????.

QQ截圖20161012162429.png

??? ??? ????? ??:

??? ??? toUpperCase() ???? ???? ??? ???? ???? ??:

var mystr="Hello world!";
var mynum=mystr.toUpperCase();

? ?? ????? mynum? ?? ??? ????. HELLO WORLD!

(2)String method

String ???? ??? ????. 19?? ?? ??? ? ?? ???? ??? ??, ?? ??, ?? ??, ?? ?? ? ???? ??? ?? ??? ?????.

charAt(n) : ???? n?? ?? ??? ?????. (0?? ??)

charCodeAt(n): ???? n?? ??? ?? ?? ??? ASCII ??? ?????.

indexOf() : ???: string_1.indexOf(string_2,n); ??? string_1? n?? ???? ??? ????, string_2? ????, ?? ?? ?? ?? ??? ?????. ?? -1? ???? n? ?? ? ? ??? ????? 0?? ???? ??? ?????.

lastIndexOf(): indexOf()? ????? ??? ?????.

split('separator') : ??? ?? ??? ?? ???? ???? ??? ?????. ?: '1&2&345&678'.split('&'); 1,2,345,678.

substring(n,m) : n ???? m ???? ?? ???? ?? ???? ?????.

substr(n,x) : ?? n?? ???? ??? x? ?? ???? ?? ???? ?????.

toLowerCase(): ?? ???? ???? ?? ???? ??? ???? ?????.

toUpperCase() : ?? ???? ?? ???? ???? ??? ???? ?????.

??? ?? ??

<html>
<body>
<script type="text/javascript">
var txt="Hello World!"
document.write(txt.length)
</script>
</body>
</html>

???? ??? ??

<html>
<body>
<script type="text/javascript">
var txt="Hello World!"
document.write("<p>Big: " + txt.big() + "</p>")
document.write("<p>Small: " + txt.small() + "</p>")
document.write("<p>Bold: " + txt.bold() + "</p>")
document.write("<p>Italic: " + txt.italics() + "</p>")
document.write("<p>Blink: " + txt.blink() + " (does not work in IE)</p>")
document.write("<p>Fixed: " + txt.fixed() + "</p>")
document.write("<p>Strike: " + txt.strike() + "</p>")
document.write("<p>Fontcolor: " + txt.fontcolor("Red") + "</p>")
document.write("<p>Fontsize: " + txt.fontsize(16) + "</p>")
document.write("<p>Lowercase: " + txt.toLowerCase() + "</p>")
document.write("<p>Uppercase: " + txt.toUpperCase() + "</p>")
document.write("<p>Subscript: " + txt.sub() + "</p>")
document.write("<p>Superscript: " + txt.sup() + "</p>")
document.write("<p>Link: " + txt.link("http://www.miracleart.cn") + "</p>")
</script>
</body>
</html>


???? ??
||
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>string對象 </title> <script type="text/javascript"> var message="I love JavaScript!"; var mychar=message.toLowerCase(); document.write("字符串為:"+mychar+"<br>"); </script> </head> <body> </body> </html>