{"id":10574,"date":"2022-10-16T20:06:39","date_gmt":"2022-10-16T12:06:39","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10574"},"modified":"2022-10-25T14:34:55","modified_gmt":"2022-10-25T06:34:55","slug":"2022-new-form-property","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2022\/10\/2022-new-form-property\/","title":{"rendered":"2022\u5e74\u65b0\u51fa\u4e86\u54ea\u4e9bform\u8868\u5355\u65b0\u7279\u6027\uff1f"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10574\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10574<\/a> \u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202210-form-new.png';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/form-new-cover.png\" width=\"480\" height=\"300\" alt=\"form\u65b0\u7279\u6027\u5360\u4f4d\u56fe\" class=\"alignright  thumb clip size-medium\" \/><\/p>\n<p>\u6211\u57282011\u5e74\uff0c\u90a3\u65f6\u5019HTML5\u521a\u51fa\u6765\u7684\u65f6\u5019\uff0c\u4ecb\u7ecd\u4e86\u4e00\u6ce2\u8868\u5355\u65b0\u5c5e\u6027\uff0c\u89c1\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2011\/06\/html5%e6%96%b0%e5%a2%9e%e7%9a%84form%e5%b1%9e%e6%80%a7%e7%ae%80%e4%bb%8b\/\">HTML5\u65b0\u589e\u7684form\u5c5e\u6027\u7b80\u4ecb<\/a>\u201d\u4e00\u6587\u3002<\/p>\n<p>\u540e\u6765\u53d1\u73b0\u8868\u5355\u5143\u7d20\u8fd8\u6709<code>formaction<\/code>\u3001<code>formenctype<\/code>\u7b49 HTML \u5c5e\u6027\uff0c\u89c1\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/08\/html5-button-formaction-formenctype-formmethod-formtarget\/\">HTML5\u65b0\u5c5e\u6027formaction,formenctype\u7b49\u7b80\u4ecb<\/a>\u201d\u4e00\u6587\u3002<\/p>\n<p>\u4ee5\u53ca\u8fd8\u6709<code>checkValidity<\/code>\u7b49form\u539f\u751f\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u89c1\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2019\/08\/js-checkvalidity-setcustomvalidity\/\">form\u539f\u751fJS\u9a8c\u8bc1\u65b9\u6cd5\u548c\u5c5e\u6027\u8be6\u7ec6\u4ecb\u7ecd<\/a>\u201d\u4e00\u6587\u3002<\/p>\n<p>\u4f60\u4ee5\u4e3a\u8fd9\u6837\u5c31\u5927\u7ed3\u5c40\u4e86\u5417\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-15_205514.jpg\" width=\"150\" height=\"100\" alt=\"\u5927\u65f6\u4ee3\u5927\u7ed3\u5c40\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6ca1\uff0c\u5c45\u7136\u8fd8\u6709\u3002<\/p>\n<p>\u5c31\u662f\u672c\u6587\u8981\u4ecb\u7ecd\u7684\u8fd9\u4e9b\u65b0\u7279\u6027\u3002<\/p>\n<h3>\u4e00\u3001requestSubmit()\u65b9\u6cd5<\/h3>\n<p><code>requestSubmit()<\/code>\u65b9\u6cd5\u548c<code>submit()<\/code>\u65b9\u6cd5\u7684\u533a\u522b\u5728\u4e8e<code>requestSubmit()<\/code>\u65b9\u6cd5\u4f1a\u89e6\u53d1\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7684<code>submit<\/code>\u4e8b\u4ef6\uff0c\u800c<code>submit()<\/code>\u65b9\u6cd5\u4f1a\u76f4\u63a5\u89e6\u53d1\u8868\u5355\u5143\u7d20\u7684\u539f\u751f\u63d0\u4ea4\uff0c\u5f80\u5f80\u4f1a\u9875\u9762\u5237\u65b0\uff08\u5982\u679caction\u5c5e\u6027\u503c\u4e3a\u7a7a\uff09\u6216\u8005\u8df3\u8f6c\u3002<\/p>\n<p>\u4f8b\u5982\u4e0b\u9762\u7684 JS \u4ee3\u7801\uff1a<\/p>\n<pre>form.addEventListener('submit', function(event) {\r\n  \/\/ \u963b\u6b62\u9ed8\u8ba4\u7684\u8868\u5355\u63d0\u4ea4\u884c\u4e3a\r\n  event.preventDefault();\r\n  console.log('\u8868\u5355\u63d0\u4ea4\u5566\uff0c\u4e0d\u4f1a\u5237\u65b0\u7684\u54e6~');\r\n});\r\n\r\nform.submit();<\/pre>\n<p>\u5176\u4e2d\u7684<code>'submit'<\/code>\u4e8b\u4ef6\u662f\u4e0d\u4f1a\u6267\u884c\u7684\uff0c\u81ea\u7136 <code>console.log()<\/code> \u91cc\u9762\u7684\u8f93\u51fa\u4e5f\u4e0d\u4f1a\u51fa\u73b0\u3002<\/p>\n<p>\u5047\u8bbe\u9875\u9762\u6709\u5982\u4e0b HTML \u4ee3\u7801\uff1a<\/p>\n<pre>&lt;form id=\"form\"&gt;   \r\n    &lt;label for=\"zxx\"&gt;\u4f5c\u8005\uff1a&lt;\/label&gt;\r\n    &lt;input name=\"author\" id=\"zxx\" value=\"zhangxinxu\"&gt;\r\n&lt;\/form&gt;<\/pre>\n<p>\u5219\u4f1a\u770b\u5230\u9875\u9762\u76f4\u63a5\u5237\u65b0\u4e86\uff0c\u8df3\u8fc7\u7ed1\u5b9a\u7684<code>'submit'<\/code>\u4e8b\u4ef6\u7684\u6267\u884c\u3002<\/p>\n<p>\u6211\u4e13\u95e8\u5f55\u4e86\u4e2aGIF\u7ed9\u5927\u5bb6\u770b\u770b\u6548\u679c\uff08\u53f0\u8bcd\u5927\u5bb6\u81ea\u884c\u8111\u8865\uff09\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/form-submit-s.gif\" width=\"604\" height=\"230\" alt=\"\u76f4\u63a5\u5237\u65b0\u65e0\u63d0\u793a\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4f46\u5982\u679c\u662f<code>requestSubmit()<\/code>\u65b9\u6cd5\uff0c\u5219\u9875\u9762\u4e0d\u4f1a\u6709\u8df3\u8f6c\uff0cconsole\u65e5\u5fd7\u4e5f\u80fd\u6253\u5370\u51fa\u6765\uff0c\u5982\u4e0b GIF \u5f55\u5c4f\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/form-submit2-s.gif\" width=\"604\" height=\"230\" alt=\"requestSubmit\u63d0\u4ea4\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53e6\u5916\uff0c<code>submit()<\/code>\u65b9\u6cd5\u4f1a\u8df3\u8fc7\u6d4f\u89c8\u5668\u5185\u7f6e\u7684\u8868\u5355\u9a8c\u8bc1\uff0c\u4f46\u662f<code>requestSubmit()<\/code>\u65b9\u6cd5\u4e0d\u4f1a\u3002<\/p>\n<p>\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff0c\u8bbe\u7f6e\u4e86 <code>required<\/code> \u5c5e\u6027\u7684 <code>&lt;input&gt;<\/code> \u8f93\u5165\u6846\u5728\u5728\u6267\u884c\u4e86<code>requestSubmit()<\/code>\u65b9\u6cd5\u540e\u51fa\u73b0\u4e86\u7cfb\u7edf\u5185\u7f6e\u7684\u51fa\u9519\u63d0\u793a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_000105.png\" width=\"473\" height=\"187\" alt=\"\u51fa\u9519\u63d0\u793a\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u517c\u5bb9\u6027<\/h4>\n<p>\u968f\u7740Safari16\u4e5f\u652f\u6301\u4e86<code>requestSubmit()<\/code>\u65b9\u6cd5\uff08\u5982\u4e0b\u517c\u5bb9\u6027\u622a\u56fe\u793a\u610f\uff09\uff0c\u76ee\u524d\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u5747\u5df2\u7ecf\u53ef\u4ee5\u4f7f\u7528\u6b64\u65b9\u6cd5\u8fdb\u884c\u8868\u5355\u5185\u5bb9\u7684\u63d0\u4ea4\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-15_215049.png\" width=\"652\" height=\"258\" alt=\"Safari 16\u652f\u6301requestSubmit\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e8c\u3001\u4e13\u4e3asubmit\u4e8b\u4ef6\u7684submitter\u5c5e\u6027<\/h3>\n<p><code>submitter<\/code>\u5c5e\u6027\u53ef\u4ee5\u8ba9\u6211\u4eec\u77e5\u9053\u8868\u5355\u63d0\u4ea4\u662f\u70b9\u51fb\u90a3\u4e2a\u6309\u94ae\u89e6\u53d1\u7684\u3002<\/p>\n<p>\u8fd9\u662f\u4e2a\u53ea\u8bfb\u5c5e\u6027\uff0c\u662fsubmit\u4e8b\u4ef6\u4e2d\u7684event\u5bf9\u8c61\u4e2d\u7684\u4e00\u4e2a\u5c5e\u6027\u3002<\/p>\n<p>\u6b64\u5c5e\u6027\u5728\u8868\u5355\u4e2d\u5b58\u5728\u591a\u4e2a\u53ef\u4ee5\u89e6\u53d1\u8868\u5355\u63d0\u4ea4\u6309\u94ae\u7684\u573a\u666f\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p>\u6211\u8fd8\u8bb0\u5f97\u6211\u5728\u5f00\u53d1LuLu UI\u7684\u7684\u8868\u5355\u89e3\u51b3\u65b9\u6848\u7684\u65f6\u5019\uff0c\u5c31\u9047\u5230\u8fd9\u6837\u7684\u95ee\u9898\uff0c\u5c31\u662f\u8868\u5355Ajax\u63d0\u4ea4\u7684\u65f6\u5019\uff0c\u9700\u8981\u7ed9\u63d0\u4ea4\u6309\u94ae\u6dfb\u52a0 loading \u6548\u679c\uff0c\u4f46\u662f\u8fd9\u4e2a\u63d0\u4ea4\u6309\u94ae\uff0c\u53ef\u80fd\u662f<code>&lt;form&gt;<\/code>\u5143\u7d20\u5b50\u5143\u7d20\uff0c\u4f46\u4e5f\u53ef\u80fd\u662f\u5f39\u6846\u91cc\u9762\u7684\u201c\u786e\u8ba4\u201d\u6309\u94ae\uff0c\u6211\u8be5\u5982\u4f55\u5224\u65adloading\u8be5\u52a0\u5728\u54ea\u4e2a\u4e0a\u9762\u5462\uff1f<\/p>\n<p>\u7136\u540e\u6211\u53ea\u80fd\u901a\u8fc7\u904d\u5386\u6309\u94ae\u7b49\u63a7\u4ef6\u5143\u7d20\u8fdb\u884c\u5224\u65ad\uff0c\u6211\u627e\u4e86\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_001301.png\" width=\"631\" height=\"118\" alt=\"\u5339\u914d\u63d0\u4ea4\u6309\u94ae\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u73b0\u5728\u6709\u4e86<code>submitter<\/code>\u5c5e\u6027\uff0c\u4e8b\u60c5\u5c31\u7b80\u5355\u591a\u4e86\uff0c\u76f4\u63a5\u4e0b\u9762\u8fd9\u6837\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre>form.addEventListener('submit', function(event) {\r\n  event.preventDefault();\r\n  event.submitter.classList.add('loading');\r\n})<\/pre>\n<h4>\u517c\u5bb9\u6027<\/h4>\n<p>\u8de8\u6d4f\u89c8\u5668\u5168\u652f\u6301\u662f\u4eceSafari 15.4\u5f00\u59cb\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u8981\u4e0d\u662fSafari\u62d6\u540e\u817f\uff0c\u6211\u4eec\u65e9\u5c31\u53ef\u4ee5\u7528\u4e0a\u8fd9\u4e2a\u5c5e\u6027\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_001823.png\" width=\"653\" height=\"277\" alt=\"summitter\u7684\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e09\u3001formdata\u4e8b\u4ef6<\/h3>\n<p>\u5148\u770b\u4f7f\u7528\u6848\u4f8b\uff0c\u6b64\u4e8b\u4ef6\u662f\u7ed1\u5b9a\u5728 <code>&lt;form&gt;<\/code>\u5143\u7d20\u4e0a\u7684\uff1a<\/p>\n<pre>form.addEventListener('formdata', (event) =&gt; {\r\n    \/\/ event.formData \u5c31\u662f\u5f53\u524d\u8868\u5355\u5143\u7d20\u7684 FormData \u5bf9\u8c61\r\n    \/\/ \u53ef\u904d\u5386\uff0c\u53ef\u6dfb\u52a0\u5220\u9664\r\n});<\/pre>\n<p>\u6709\u4ec0\u4e48\u7528\u5462\uff1f<\/p>\n<p>\u4e3b\u8981\u662f\u53ef\u4ee5\u8ba9\u8868\u5355\u5728\u63d0\u4ea4\u4e4b\u524d\uff08\u6570\u636e\u53d1\u9001\u5230\u670d\u52a1\u5668\u4e4b\u524d\uff09\uff0c\u6539\u53d8\u9700\u8981\u53d1\u9001\u7684\u8868\u5355\u6570\u636e\u3002<\/p>\n<p>\u4e3e\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<pre>&lt;form id=\"form\"&gt;   \r\n    &lt;label for=\"zxx\"&gt;\u4f5c\u8005\uff1a&lt;\/label&gt;\r\n    &lt;input name=\"author\" id=\"zxx\" value=\"zhangxinxu\" required&gt;\r\n    &lt;p&gt;\r\n        &lt;button type=\"submit\"&gt;\u63d0\u4ea4&lt;\/button&gt;\r\n    &lt;\/p&gt;\r\n&lt;\/form&gt;<\/pre>\n<pre>form.addEventListener('formdata', (event) =&gt; {\r\n    event.formData.append('name', 'zhangxinxu');\r\n});<\/pre>\n<p>\u6b64\u65f6\uff0c\u70b9\u51fb\u63d0\u4ea4\u6309\u94ae\u7684\u65f6\u5019\uff0c<code>name:zhangxinxu<\/code>\u8fd9\u4e2a\u6570\u636e\u4e5f\u4f1a\u4e00\u5e76\u63d0\u4ea4\uff0c\u6b64\u65f6\u53ef\u4ee5\u770b\u5230 URL \u5730\u5740\u540e\u9762\u4f1a\u662f\u4e0b\u9762\u8fd9\u6837\u7684\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_152923.png\" width=\"642\" height=\"135\" alt=\"\u6dfb\u52a0\u65b0\u7684\u63d0\u4ea4\u6570\u636e\" class=\"alignnone size-medium\" \/><\/p>\n<p><strong>\u5982\u679c\u539f\u672c\u5c31\u662f\u65e0\u5237\u65b0\u7684\uff1f<\/strong><\/p>\n<p>\u5373\u4f7f\u6211\u4eec\u7684\u8868\u5355\u63d0\u4ea4\u662f\u65e0\u5237\u65b0\u7684\uff0c\u4e5f\u5c31\u662f preventDefault submit\u4e8b\u4ef6\uff0c\u7136\u540e\u6a21\u62df Ajax \u8bf7\u6c42\u3002<\/p>\n<p>formdata\u4e8b\u4ef6\u4e5f\u662f\u6709\u610f\u4e49\u7684\uff0c\u4ed6\u53ef\u4ee5\u8ba9\u6211\u4eec\u7684\u903b\u8f91\u5b9e\u73b0\u66f4\u52a0\u6e05\u6670\uff0c\u4ee3\u7801\u7ec4\u7ec7\u66f4\u52a0\u5408\u7406\uff0c\u4f8b\u5982\uff0c\u6211\u4eec\u53ea\u9700\u8981\u76f4\u63a5\u83b7\u53d6\u8868\u5355\u5143\u7d20\u7684FormData\u5bf9\u8c61\uff0c\u7136\u540e\u63d0\u4ea4\u5373\u53ef\u3002<\/p>\n<p>\u81f3\u4e8eFormData\u5bf9\u8c61\u5185\u5bb9\u7684\u5904\u7406\uff0c\u4ea4\u7ed9\u5916\u90e8\u7684formdata\u4e8b\u4ef6\u5373\u53ef\u3002<\/p>\n<p>\u4f8b\u5982\u4e0b\u9762\u7684JS\u4ee3\u7801\u793a\u610f\uff08\u7d27\u63a5\u7740\u4e0a\u9762\u4f8b\u5b50\u7684\u4ee3\u7801\uff09\uff1a<\/p>\n<pre>form.addEventListener('submit', function (event) {\r\n    event.preventDefault();\r\n    \/\/ \u663e\u793a\u6b64\u65f6\u7684FormData\r\n    let formData = new FormData(this);\r\n    for (const entry of formData.keys()) {\r\n        console.log(entry);\r\n    }\r\n});<\/pre>\n<p>\u4f1a\u8f93\u51fa\u4e24\u4e2a\u4e0d\u540c\u7684\u63d0\u4ea4\u5b57\u6bb5\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_173256.png\" width=\"260\" height=\"189\" alt=\"\u5b57\u6bb5\u8f93\u51fa\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4f60\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202210\/formData.html\" rel=\"noopener\" target=\"_blank\">formData\u4e8b\u4ef6\u4f53\u9a8cdemo<\/a><\/p>\n<p>\u4e0a\u9762\u7b2c\u4e00\u4e2a\u4f8b\u5b50\uff0c\u76f4\u63a5\u70b9\u51fb\u7b2c\u4e00\u4e2a\u6309\u94ae\uff0c\u7b2c\u4e8c\u4e2a\u4f8b\u5b50\uff0c\u5148\u70b9\u51fb\u7ed1\u5b9a\u6309\u94ae\uff0c\u518d\u70b9\u51fb\u63d0\u4ea4\u6309\u94ae\u3002<\/p>\n<p>\u5bf9\u5e94\u4ee3\u7801\u53c2\u89c1\u9875\u9762\u6e90\u4ee3\u7801\uff0c\u5f88\u5e72\u51c0\u3002<\/p>\n<h4>\u517c\u5bb9\u6027<\/h4>\n<p>\u6b64\u4e8b\u4ef6\u5168\u9762\u652f\u6301\u5b9e\u5728Safari 15\u4e4b\u540e\uff0c\u53c2\u89c1\u622a\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_173525.png\" width=\"653\" height=\"248\" alt=\"FormData\u4e8b\u4ef6\u7684\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u56db\u3001showPicker()\u65b9\u6cd5<\/h3>\n<p><code>showPicker()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5728\u6ca1\u6709\u70b9\u51fb\u884c\u4e3a\u89e6\u53d1\u7684\u60c5\u51b5\u4e0b\uff0c\u8ba9\u90e8\u5206\u81ea\u5e26\u4ea4\u4e92\u9762\u677f\u7684input\u8f93\u5165\u6846\u663e\u793a\u8fd9\u4e9b\u4ea4\u4e92\u5c42\uff0c\u6bd4\u65b9\u8bf4date\u65e5\u671f\u9009\u62e9\u8f93\u5165\u6846\uff0ccolor\u989c\u8272\u9009\u62e9\u8f93\u5165\u6846\uff0cfile\u6587\u4ef6\u9009\u62e9\u6846\u7b49\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>&lt;input id=\"date\" type=\"date\"&gt;\r\n&lt;button id=\"button\"&gt;\u70b9\u51fb\u663e\u793a\u65e5\u671f&lt;\/button&gt;<\/pre>\n<pre>button.addEventListener('click', function () {\r\n  date.showPicker();   \r\n});<\/pre>\n<p>\u6b64\u65f6\u70b9\u51fb\u6309\u94ae\uff0c\u5c31\u4f1a\u663e\u793a\u65e5\u671f\u9009\u62e9\u8f93\u5165\u6846\uff0c\u622a\u56fe\u6240\u793a\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_190820.png\" width=\"240\" height=\"327\" alt=\"\u65e5\u671f\u8f93\u5165\u6846\u547c\u8d77\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202210\/js-showpicker-demo.php\" rel=\"noopener\" target=\"_blank\">showPicker\u663e\u793a\u65e5\u671f\u9009\u62e9\u6846demo<\/a><\/p>\n<h4>\u517c\u5bb9\u6027<\/h4>\n<p>\u540c\u6837\u7684\uff0c\u8fd8\u662fSafari\u6d4f\u89c8\u5668\u62d6\u4e86\u540e\u817f\uff0c\u5230Safari 16\u624d\u652f\u6301\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/2022-10-16_191049.png\" width=\"648\" height=\"242\" alt=\"Safari 16\u652f\u6301showPicker\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u4e94\u3001\u6682\u544a\u4e00\u6bb5\u843d<\/h3>\n<p>\u597d\u4e86\uff0c\u5c31\u5148\u4ecb\u7ecd\u8fd9\u4e48\u591a\u5427\uff0c\u7b49\u518d\u6512\u4e00\u6ce2\u8868\u5355\u65b0\u7279\u6027\uff0c\u6211\u518d\u66f4\u65b0\u4e00\u6b21\u3002<\/p>\n<p>\u53c2\u8003\u6587\u7ae0\uff1a<a href=\"https:\/\/css-tricks.com\/whats-new-with-forms-in-2022\/\" rel=\"noopener\" target=\"_blank\">What\u2019s New With Forms in 2022?<\/a><\/p>\n<p><img decoding=\"async\" src=\"\/\/mat1.gtimg.com\/www\/mb\/images\/face\/29.gif\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=10574\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=10574<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202210\/form-new-cover.png\" width=\"160\" height=\"100\" alt=\"form\u65b0\u7279\u6027\u5360\u4f4d\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>\u6211\u4ee5\u4e3a\u6211\u6478\u900f\u4e86form\u8868\u5355\u7684\u6240\u6709\u5bb6\u5e95 \uff0c\u6b8a\u4e0d\u77e5\u53c8\u4ece\u54ea\u91cc\u5192\u51fa\u4e86\u4e00\u6ce2\u65b0\u5c5e\u6027\u65b0\u65b9\u6cd5\uff0c\u5b66\uff0c\u6211\u7ee7\u7eed\u5b66\uff0c\u6211\u5b66\u8fd8\u4e0d\u884c\u561b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1097],"tags":[607,871,1872,1873,1871],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10574"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=10574"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/10574\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}