JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→大きくする big) |
(→小さくする small) |
||
| 180行: | 180行: | ||
と、上記のように引数は設定できません。bigのときと同じように利用することができます。 | と、上記のように引数は設定できません。bigのときと同じように利用することができます。 | ||
| + | |||
| + | |||
| + | サンプルスクリプト | ||
| + | <syntaxhighlight lang="javascript" line start="1"> | ||
| + | strData6 = new String("フォントサイズを小さくする(small)"); | ||
| + | |||
| + | document.write(strData6.small(), 1, "</BR></BR>"); | ||
| + | document.write(strData6.small().small(), 2, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small(), 3, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small(), 4, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small(), 5, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small(), 6, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small(), 7, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small(), 8, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small().small(), 9, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small().small().small(), 10, "</BR></BR>"); | ||
| + | document.write("C".small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small(), 20, "</BR></BR>"); | ||
| + | |||
| + | </syntaxhighlight> | ||
| + | |||
| + | |||
| + | 表示結果: | ||
| + | |||
| + | <yjavascript> | ||
| + | strData6 = new String("フォントサイズを小さくする(small)"); | ||
| + | |||
| + | document.write(strData6.small(), 1, "</BR></BR>"); | ||
| + | document.write(strData6.small().small(), 2, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small(), 3, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small(), 4, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small(), 5, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small(), 6, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small(), 7, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small(), 8, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small().small(), 9, "</BR></BR>"); | ||
| + | document.write(strData6.small().small().small().small().small().small().small().small().small().small(), 10, "</BR></BR>"); | ||
| + | document.write("C".small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small().small(), 20, "</BR></BR>"); | ||
| + | |||
| + | </yjavascript> | ||
=== 点滅させる blink ※無効ブラウザばかりです。 === | === 点滅させる blink ※無効ブラウザばかりです。 === | ||