JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→文字列オブジェクトの生成 String) |
(→文字列オブジェクトの生成 String) |
||
| 19行: | 19行: | ||
<syntaxhighlight lang="javascript" line start="1"> | <syntaxhighlight lang="javascript" line start="1"> | ||
| + | <HTML> | ||
| + | <HEAD> | ||
| + | <TITLE>JavaScript Array</TITLE> | ||
| + | </HEAD> | ||
| + | <BODY> | ||
| + | JavaScript Array<br /> | ||
| + | <SCRIPT Language="JavaScript"> | ||
| + | <!-- | ||
| + | strData1 = new String(); | ||
| + | strData2 = new String("java scriptは楽しい。まるで麻薬のようだ。"); | ||
| + | strData3 = new String(771); | ||
| + | strData3 = strData3 + 7; | ||
| + | |||
| + | document.write("■String<br />"); | ||
| + | document.write("strData1 = ", strData1, "<br />"); | ||
| + | document.write("strData2 = ", strData2, "<br />"); | ||
| + | document.write("strData3 = ", strData3, "<br />"); | ||
| + | |||
| + | --> | ||
| + | </SCRIPT> | ||
| + | </BODY> | ||
| + | </HTML> | ||
</syntaxhighlight> | </syntaxhighlight> | ||