

#
“value”属性について
“value”属性は“button”要素自体にフォームで送信するデータの値を指定する属性です。
“value”属性で指定した値はフォームを送信するときに“name”属性で指定した“button”要素の名前とともに送信されます。
#
#
サンプルコード
<form method="post" action="sample-buttontag1.php" target="_blank">
<fieldset>
<legend>好きな猫は?</legend>
<p>
<button type="submit" name="type" value="白">白猫</button>
<button type="submit" name="type" value="黒">黒猫</button>
<button type="submit" name="type" value="白黒">白黒猫</button>
<button type="submit" name="type" value="キジトラ">キジトラ猫</button>
<button type="submit" name="type" value="茶トラ">茶トラ猫</button>
<button type="submit" name="type" value="三毛">三毛猫</button>
<button type="submit" name="type" value="その他">ほかの猫</button>
</p>
</fieldset>
</form>