ボタン内の文字を移動させる


■動作ブラウザ 【 IE:4.0  NN:-】
Internet Explorer Netscape Navigator DreamPassport iCab
3.0x 4.0x 4.5 5.0x 5.5 2.0x 3.0x 4.0x 4.x 6.0 2 3 2.x
Windows × ○ - ○ ○ × × × × × - × -
Macintosh × ○ ○ ○ - × × × × × - - ○
UNIX - - - - - × × × × × - - -
Dreamcast - - - - - - - - - - × × -

ポイント <button> <marquee width="160">どうかな?</marquee> </button>
説  明 ボタン内の文字をスクロールさせるにはmarqueeタグをbuttonタグで囲みます。
サンプル <html> <head> <title>ボタン内の文字を移動させる</title> </head> <body> <form> <button> <marquee width="160">どうかな?</marquee> </button> </form> </body> </html>
補足説明 JavaScriptで制御する場合はブラウザや環境により期待通り動作しない場合がありますが、「document.フォーム名.ボタン名.value」に文字列を代入することでボタン内の文字を変更することができます。

■サンプルスクリプトを実行する >>実行
■各ブラウザでの動作結果を見る >>View!

写真素材 PIXTA