<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>種類の違うフォームコントロールへの値の入力</title>
<script type="text/javascript">
<!--
function doGet() {
	var form = document.forms["form1"];
	form.method = "get";
	form.submit();
}
function doPost() {
	var form = document.forms["form1"];
	form.method = "post";
	form.submit();
}
//-->
</script>
</head>

<body>
<form id="form1" method="post" action="form.cmd">
  <div id="control">
  <p id="hidden">hidden <input type="hidden" name="value"></p>
  <p id="textfield">
    <input name="value" type="text" value="a">
  </p>
  <p id="textarea"><textarea name="value">a</textarea></p>
  <p id="checkbox">
    <label>
    <input type="checkbox" name="value" value="a">
    a</label>
    <label>
    <input type="checkbox" name="value" value="b">
    b</label>
    <label>
    <input type="checkbox" name="value" value="c">
    c</label>
  </p>
  <p id="radio">
    <label>
    <input name="value" type="radio" value="a">
    a</label>
    <label>
    <input name="value" type="radio" value="b">
    b</label>
    <label>
    <input name="value" type="radio" value="c">
    c</label>
  </p>
  <p id="menu">
    <select name="value">
      <option selected>a</option>
      <option>b</option>
      <option>c</option>
    </select>
  </p>
  <p id="list">
    <select name="value" size="3" multiple>
      <option>a</option>
      <option>b</option>
      <option>c</option>
    </select>
  </p>
  </div>
  <p>
    <select name="type">
      <option>hidden</option>
      <option selected>textfield</option>
      <option>textarea</option>
      <option>checkbox</option>
      <option>radio</option>
      <option>menu</option>
      <option>list</option>
    </select>
    <input type="button" name="GetBtn" value="GET" onClick="doGet();">
	<input type="button" name="PostBtn" value="POST" onClick="doPost();">
  </p>
</form>
</body>
</html>
