<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## form表單 ```html <form action="form_action.asp" method="get"> <p>First name: <input type="text" name="fname" /></p> <p>Last name: <input type="text" name="lname" /></p> <input type="submit" value="Submit" /> </form> ``` 表單用于向服務器傳輸數據,是基礎的html標簽,在網頁中扮演著重要的角色。它的本質是要發起請求,用于向服務器發送數據。 下面就來討論form表單的重要知識: **請求類型** get,post兩種。 * * * * * **關于提交按鈕** ``` <form action="form_action.asp" method="get"> 有提交效果 <input type="submit" value="Submit" /> <button type="submit" value="Submit">Submit</button> 無提交效果 <input type="button" value="Submit" /> <button type="button" value="Submit">submit</button> </form> ``` 如果提交按鈕不在form內,那么無效。 >[danger] 注意:請始終為按鈕規定 type 屬性。Internet Explorer 的默認類型是 "button",而其他瀏覽器中(包括 W3C 規范)的默認值是 "submit"。 提交按鈕如果有name屬性,那么也會是一個數據字段哦。 * * * * * **關于action地址后的查詢字段** 如果是get請求,那么會自動忽略掉查詢字符串,此時請用 `<input type="hidden" name="id" />` 隱藏域表單埋默認數據。 如果是post請求,則不會忽略查詢字符串。 * * * * * **原生表單也能模擬出ajax不刷新提交效果** 利用 `target="framename"`就可以實現往一個內聯框架中“請求”,能做到提交正常表單,頁面不刷新的效果。 * * * * * **阻止表單提交事件** 原生: jQuery * * * * * **獲取表單對象和值** 原生: jQuery: * * * * * **html5 FormData API** 能實現真正的異步上傳,和ajax一樣的體驗。 參考: [Web 前沿——HTML5 Form Data 對象的使用](http://www.cnblogs.com/lhb25/p/html5-formdata-tutorials.html) * * * * * last update:2017-8-18 22:52:54
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看