情報学部 | 菅沼ホーム | HTML 目次 | 索引 |
interface HTMLSelectElement : HTMLElement { attribute boolean autofocus; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute boolean multiple; attribute DOMString name; attribute boolean required; attribute unsigned long size; readonly attribute DOMString type; readonly attribute HTMLOptionsCollection options; attribute unsigned long length; getter Element item(unsigned long index); object namedItem(DOMString name); void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); void remove(long index); setter creator void (unsigned long index, HTMLOptionElement? option); readonly attribute HTMLCollection selectedOptions; attribute long selectedIndex; attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; };
<!DOCTYPE HTML> <HTML> <HEAD> <!-- タイトル --> <TITLE>FIELDSET,LEGEND,LABEL</TITLE> <!-- スタイルシート --> <LINK REL="stylesheet" TYPE="text/css" HREF="../../master.css"> <!-- 文字コード --> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <!-- スマホ --> <META NAME=viewport CONTENT="width=device-width, initial-scale=1"> </HEAD> <BODY CLASS="white"> <P CLASS="center">FORM 要素の内部にすべて記述</P> <DIV CLASS="no"><FORM NAME="form1" ID="form1_ID" ACTION="test2.php" METHOD="post"> <P><LABEL>氏名: </LABEL><INPUT TYPE="text" NAME="shimei" SIZE="20" STYLE="font-size: 90%"></P> <FIELDSET> <LEGEND>性別</LEGEND> <LABEL><INPUT TYPE="radio" NAME="sex" VALUE="male">男</LABEL><BR> <LABEL><INPUT TYPE="radio" NAME="sex" VALUE="female">女</LABEL><BR> </FIELDSET> <BR> <FIELDSET> <LEGEND>住所</LEGEND> <LABEL>郵便番号: </LABEL><INPUT TYPE="text" NAME="te" SIZE="8" STYLE="font-size: 90%"> <LABEL FOR="tel_ID">電話番号: </LABEL><INPUT TYPE="text" NAME="tel" ID="tel_ID" SIZE="15" STYLE="font-size: 90%"><BR> <LABEL>住所: <INPUT TYPE="text" NAME="adr" SIZE="50" STYLE="font-size: 90%"></LABEL> </FIELDSET> <P STYLE="text-align: center"><INPUT TYPE="submit" VALUE="送信" STYLE="font-size: 90%"></P> </FORM></DIV> <HR STYLE="height: 5px; background-color: #ff0000"> <P CLASS="center">FORM 要素の外部に一部を記述</P> <DIV CLASS="no"><FORM NAME="form2" ID="form2_ID" ACTION="test2.php" METHOD="post"> <P><LABEL>氏名: </LABEL><INPUT TYPE="text" NAME="shimei" SIZE="20" STYLE="font-size: 90%"></P> <FIELDSET> <LEGEND>性別</LEGEND> <LABEL><INPUT TYPE="radio" NAME="sex" VALUE="male">男</LABEL><BR> <LABEL><INPUT TYPE="radio" NAME="sex" VALUE="female">女</LABEL><BR> </FIELDSET> <BR> </FORM> <FIELDSET> <LEGEND>住所</LEGEND> <LABEL>郵便番号: </LABEL><INPUT TYPE="text" FORM="form2_ID" NAME="te" SIZE="8" STYLE="font-size: 90%"> <LABEL>電話番号: </LABEL><INPUT TYPE="text" FORM="form2_ID" NAME="tel" SIZE="15" STYLE="font-size: 90%"><BR> <LABEL>住所: </LABEL><INPUT TYPE="text" FORM="form2_ID" NAME="adr" SIZE="50" STYLE="font-size: 90%"> </FIELDSET> <P STYLE="text-align: center"><INPUT FORM="form2_ID" TYPE="submit" VALUE="送信" STYLE="font-size: 90%"></P></DIV> </BODY> </HTML>
<!DOCTYPE HTML> <HTML> <HEAD> <!-- タイトル --> <TITLE>BUTTON,SELECT,OPTGROUP,OPTION,TEXTAREA</TITLE> <!-- スタイルシート --> <LINK REL="stylesheet" TYPE="text/css" HREF="../../master.css"> <!-- 文字コード --> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <!-- スマホ --> <META NAME=viewport CONTENT="width=device-width, initial-scale=1"> </HEAD> <BODY CLASS="white"> <H1 CLASS="center">SELECT,TEXTAREA,BUTTON 要素</H1> <FORM NAME="form1" ID="form1_ID" ACTION="test2.php" METHOD="post"> <FIELDSET> <LEGEND>好きな食べ物</LEGEND> <SELECT SIZE="6" NAME="food" STYLE="font-size: 90%"> <OPTGROUP LABEL="果物"> <OPTION VALUE="orange"> 蜜柑 </OPTION><BR> <OPTION VALUE="apple"> 林檎 </OPTION><BR> <OPTION VALUE="grape"> 葡萄 </OPTION><BR> </OPTGROUP> <OPTGROUP LABEL="魚"> <OPTION VALUE="aji"> 鰺 </OPTION><BR> <OPTION VALUE="iwashi"> 鰯 </OPTION><BR> <OPTION VALUE="tai"> 鯛 </OPTION><BR> </OPTGROUP> </SELECT> </FIELDSET> <BR> <LABEL>ご意見: <TEXTAREA TYPE="text" NAME="op" COLS="50" ROWS="5" PLACEHOLDER="ご意見をお願いします" MAXLENGTH="25" STYLE="font-size: 90%"></TEXTAREA></LABEL><BR><BR> <P STYLE="text-align: center"><BUTTON TYPE="submit" STYLE="font-size: 90%">送信</BUTTON></P> </FORM> </BODY> </HTML>
情報学部 | 菅沼ホーム | HTML 目次 | 索引 |