1つのformで複数ボタンを作り、どのボタンが押されたのかをCGI側で判定したい場合があります。 まずこのようなJavaScriptを定義しておきます。 <script> function do_submit(target) { window.document.form1.target.value = target ; document.form1.submit(); } </script> formのHTMLはこのようになります。 <form action="/some_cgi" method="post" name="form1"> <input type=hidden name="target" value=""> <input type="button" name="button" value="ボタン1" onclick="do_submit('button1')"> <br>