<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ボタン</title> <link href="/gudon/css/default.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>ボタン</h1> <hr /> <form action="test1.php" onsubmit="alert('onsubmit');"> <input name="textbox1" type="text" value="テキストボックス"/> <!-- ① inputボタン inputタグ(type="button) --> <input name="button1" type="button" value="inputボタン" onclick="alert('inputボタン-onclick');"/> <!-- ② buttonボタン buttonタグ --> <button name="button2" value="buttonボタン" onclick="alert('buttonボタン-onclick');">button</button> <!-- ③ resetボタン inputタグ(type="reset") --> <input name="button3" type="reset" value="resetボタン" onclick="alert('resetボタン-onclick');"/> <!-- ④ submitボタン inputタグ(type="submit") --> <input name="button4" type="submit" value="submitボタン" onclick="alert('submitボタン-onclick');"/> </form> <!-- form部品をformの外で使う事もできる --> <button name="button5" value="formの外ボタン" onclick="alert('formの外ボタン-onclick');">button</button> </body> </html>