テキスト(文字列)又はボタンのクリックでメッセージ表示
この事例では、Java Script文をHTML内に記述しています
1 2 3 4 5 6 7 8 9 |
<!-- HTML 表記 --> <div style="margin-left:20px; margin-top:50px;"> <b>1.<a href="javascript:alert('Federation Internationale de Football Association \n 国際サッカー連盟')">FIFA</a></b> </div> <div style="margin-left:20px; margin-top:10px;"> <form name="form1"> <b>2.</b><input type="button" style="background-color:yellow;" value="ご挨拶" onClick="alert('ホームページ見て頂きありがとう。')"> </form> </div> |