JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→大きくする big) |
(→大きくする big) |
||
| 135行: | 135行: | ||
上記のように引数には何も指定できません。文字を大きくするというあいまいな指定です。 | 上記のように引数には何も指定できません。文字を大きくするというあいまいな指定です。 | ||
| + | |||
| + | |||
| + | サンプルスクリプト | ||
| + | <syntaxhighlight lang="javascript" line start="1"> | ||
| + | strData5 = new String("フォントサイズを大きくする(big)"); | ||
| + | |||
| + | document.write(strData5.big(), 1, "</BR></BR>"); | ||
| + | document.write(strData5.big().big(), 2, "</BR></BR>"); | ||
| + | document.write(strData5.big().big().big(), 3, "</BR></BR>"); | ||
| + | document.write(strData5.big().big().big().big(), 4, "</BR></BR>"); | ||
| + | |||
| + | </syntaxhighlight> | ||
| + | |||
| + | |||
| + | 表示結果: | ||
| + | |||
| + | <yjavascript> | ||
| + | strData5 = new String("フォントサイズを大きくする(big)"); | ||
| + | |||
| + | document.write(strData5.big(), 1, "</BR></BR>"); | ||
| + | document.write(strData5.big().big(), 2, "</BR></BR>"); | ||
| + | document.write(strData5.big().big().big(), 3, "</BR></BR>"); | ||
| + | document.write(strData5.big().big().big().big(), 4, "</BR></BR>"); | ||
| + | |||
| + | </yjavascript> | ||
=== 小さくする small === | === 小さくする small === | ||