久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

form HTML元素

 小明 2006-11-10

定義

說(shuō)明所包含的控件是某個(gè)表單的組成部分,。

Specifies that the contained controls take part in a form.

注釋

安全性警告:錯(cuò)誤地使用該對(duì)象可能危及你應(yīng)用程序的安全,。通過(guò)表單傳遞的數(shù)據(jù)使用HTTP協(xié)議,該協(xié)議沒(méi)有經(jīng)過(guò)加密,,所以很有可能在傳遞中,,數(shù)據(jù)被他人讀取或篡改。安全超文本傳輸協(xié)議 (HTTPS) 可以提供安全的數(shù)據(jù)傳送,。

表單允許客戶(hù)端的用戶(hù)以標(biāo)準(zhǔn)格式向服務(wù)器提交數(shù)據(jù),。表單的創(chuàng)建者為了收集所需數(shù)據(jù),使用了各種控件設(shè)計(jì)表單,,如 INPUT 或 SELECT,。查看表單的用戶(hù)只需填寫(xiě)數(shù)據(jù)并單擊提交按鈕即可向服務(wù)器發(fā)送數(shù)據(jù)。服務(wù)器上的腳本會(huì)處理這些數(shù)據(jù)。

如果控件元素中的數(shù)據(jù)要隨表單一起發(fā)送出去的話(huà),,那么必須定義每個(gè)控件元素的 NAME 標(biāo)簽屬性,。要引用表單中的元素,可使用元素的 name 屬性或 id 屬性,,或通過(guò) elements 集合引用,。

如果焦點(diǎn)位于表單中的某個(gè)控件時(shí)而用戶(hù)按了 ESC 鍵,該控件的值將會(huì)恢復(fù)到上次的值,。如果用戶(hù)再次按 ESC 鍵,,整個(gè)表單都會(huì)重置。如果焦點(diǎn)位于表單中但并不在某個(gè)控件時(shí)用戶(hù)按了 ESC 鍵,,整個(gè)表單都會(huì)重置,。

如果表單僅包含一個(gè)文本框時(shí)用戶(hù)按下回車(chē)鍵,會(huì)觸發(fā)onsubmit 事件,。如果表單有 INPUT type=submit 元素,,該元素將顯示成帶有黑色邊框的按鈕,表示用戶(hù)按下回車(chē)鍵即可提交表單,。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 和腳本中可用,。

此元素是塊元素。

此元素需要關(guān)閉標(biāo)簽,。

Security Alert  Using this object incorrectly can compromise the security of your application. Data submitted through a form using the HTTP protocol is not encrypted and can be read and possibly tampered with in transmission. The Secure Hypertext Transfer Protocol (HTTPS) can provide more secure data transmission.

Forms enable client-side users to submit data to a server in a standardized format. The creator of a form designs the form to collect the required data using a variety of controls, such as INPUT or SELECT. Users viewing the form fill in the data and then click the Submit button to send the data to the server. A script on the server then processes the data.

Each control element‘s NAME attribute must be defined if the data is to be submitted with the form. An element in a form can be referenced by the name property or the id property, or through the elements collection.

When the focus is on a control in a form and the user presses ESC, the value of the control reverts to the last value. The form resets if the user presses ESC again. If the focus is on the form but not on a particular control and the user presses ESC once, the form resets.

If the form includes only one text box and the user presses ENTER, the onsubmit event fires. If the form has an INPUT type=submit element, it will appear as a button with a dark border, which indicates the user can press ENTER to submit the form.

This element is available in HTML and script as of Internet Explorer 3.0.

This element is a block element.

This element requires a closing tag.

示例代碼

下面的例子使用 FORM 元素創(chuàng)建了一個(gè)簡(jiǎn)單的表單,,其中包含一個(gè)用于輸入用戶(hù)姓名的文本框和用于選擇喜愛(ài)冰淇淋口味的選擇框。當(dāng)用戶(hù)單擊提交按鈕時(shí),,表單將把數(shù)據(jù)發(fā)送到 ACTION 標(biāo)簽屬性列出的 URL,。METHOD 標(biāo)簽屬性的值決定了將服務(wù)器發(fā)送到服務(wù)器的方式。

This example uses the FORM element to create a basic form containing a text entry box for the user‘s name and a select control for choosing a favorite ice cream flavor. When the user clicks the Submit button, the form sends the data to the URL listed in the ACTION attribute. The value of the METHOD attribute determines how to send the data to the server.

<HTML>
    <FORM ACTION="
        輸入你的姓名: <INPUT NAME="FName"><BR>
        你最喜歡的冰淇淋口味:
        <SELECT NAME="Flavor">
            <OPTION VALUE="Chocolate">巧克力
            <OPTION VALUE="Strawberry">草莓
            <OPTION VALUE="Vanilla" SELECTED>香草
        </SELECT>
        <P><INPUT TYPE=SUBMIT>
    </FORM>
</HTML>

相關(guān)教程和示例代碼

HTML表單

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,,所有內(nèi)容均由用戶(hù)發(fā)布,,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購(gòu)買(mǎi)等信息,,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請(qǐng)點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多