{"id":610,"date":"2010-07-25T01:18:34","date_gmt":"2010-07-24T17:18:34","guid":{"rendered":""},"modified":"2014-03-11T22:33:02","modified_gmt":"2014-03-11T14:33:02","slug":"%e7%bb%99%e6%8f%90%e4%ba%a4%e5%92%8c%e9%87%8d%e7%bd%ae%e6%8c%89%e9%92%ae%e8%ae%be%e7%bd%ae%e5%9b%be%e7%89%87%e8%83%8c%e6%99%af","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2010\/07\/25\/610.htm","title":{"rendered":"\u7ed9\u63d0\u4ea4\u548c\u91cd\u7f6e\u6309\u94ae\u8bbe\u7f6e\u56fe\u7247\u80cc\u666f"},"content":{"rendered":"<p class=\"g_p_center g_t_wrap g_t_left g_t_20 g_c_pdin c07\" style=\"margin: 20px auto 10px\"><span><font size=\"4\">\u56fe\u7247\u505a\u63d0\u4ea4\u6309\u94ae\u548c\u91cd\u7f6e\u6309\u94ae<\/font><\/span><\/p>\n<div class=\"g_p_center g_t_right g_c_pdin g_h_20 c08\" style=\"margin-bottom: 15px\">\n<div class=\"g_p_left\">\n<div>&nbsp;<\/div>\n<p><font size=\"4\">1.<\/font><\/div>\n<\/div>\n<div class=\"g_blog_list\">\n<div class=\"g_t_center g_c_pdin g_p_center c07 content\">\n<div class=\"ns_content\">\n<p><font size=\"4\">&lt;input type=image src=&quot;web-pic\/submit.jpg&quot; on<wbr><\/wbr>Click = &quot; return form1_on<wbr><\/wbr>submit()&quot; \/&gt;<br \/>\n&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp; &lt;input type=&quot;image&quot;src=&quot;web-pic\/reset.jpg&quot;on<wbr><\/wbr>click=&quot;javas<wbr><\/wbr>cript:document.forms[&#8216;form&#8217;].reset(); return false;&quot;\/&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u6709\u65f6\u5019\u4e3a\u4e86\u8fbe\u5230\u6bd4\u8f83\u597d\u7684\u89c6\u89c9\u6548\u679c\uff0c\u6709\u4eba\u4f1a\u4f7f\u7528\u56fe\u7247\u4ee3\u66ff\u6309\u94ae\u6765\u63d0\u4ea4\u6216\u8005\u91cd\u7f6e\u8868\u5355\u6570\u636e\u3002<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;FORM name=RedForm act<wbr><\/wbr>ion=# &gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u4e00:<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;INPUT name=textfield2&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;INPUT type=image height=19 width=53 src=&quot;xxx.gif&quot; align=absMiddle border=0 name=RedImg on<wbr><\/wbr>click=&quot;this.form.submit()&quot;&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;INPUT type=image height=19 width=53 src=&quot;xxx.gif&quot; align=absMiddle border=0 name=RedImg3 on<wbr><\/wbr>click=&quot;this.form.reset()&quot;&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;\/FORM&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u4e8c:<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u4ee3\u66ffsubmit\u6309\u94ae\u7684\u56fe\u7247\u4ee3\u7801\u683c\u5f0f\u662f<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;input type=&quot;image&quot; name=&quot;&#8230;&quot; src=&quot;&#8230;&quot; on<wbr><\/wbr>Click=&quot;document.formName.submit()&quot;&gt;<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u4ee3\u66ffreset\u6309\u94ae\u7684\u4ee3\u7801\u56fe\u7247\u683c\u5f0f\u662f<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">&lt;a href=&quot;javas<wbr><\/wbr>cript:document.formName.reset();&quot;&gt;&lt;img border=0 src=&quot;&#8230;&quot;&gt;&lt;\/a&gt;<\/font><\/p>\n<p>\n<font size=\"4\">\u4e09:<br \/>\n&lt;form&gt;<\/font><\/p>\n<p><font size=\"4\">&lt;INPUT name=textfield2&gt;<\/font><\/p>\n<p><font size=\"4\">&lt;INPUT type=image height=19 width=53 src=&quot;xxx.gif&quot; align=absMiddle border=0 name=RedImg on<wbr><\/wbr>Click=&quot;frm1.act<wbr><\/wbr>ion=&#8217;link.asp&#8217;&quot;&gt;<\/font><\/p>\n<p>\n<font size=\"4\">\u901a\u8fc7on<wbr><\/wbr>Click=&quot;document.form.submit()&quot;\u6765\u63d0\u4ea4\u8868\u5355\uff1b\u7528on<wbr><\/wbr>Click=&quot;document.form.reset()&quot;\u6765\u590d\u4f4d\u8868\u5355\uff0c\u8fd9\u6837\u4e00\u6765\uff0c\u4efb\u4f55\u4e00\u4e2a\u5143\u7d20\uff08\u4e0d\u4ec5\u662f\u56fe\u7247\uff09\u90fd\u53ef\u4ee5\u5b9e\u73b0\u63d0\u4ea4\u8868\u5355\u4e86\u3002<\/font><\/p>\n<p style=\"text-indent: 2em\"><font size=\"4\">\u5728\u8fd9\u6837\u5b50\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u56fe\u7247\u7684\u957f\u5ea6\u548c\u5bbd\u5ea6\u7b49<\/font><\/p>\n<h1><font size=\"4\">\u4f7f\u7528\u56fe\u7247\u505a\u6309\u94ae\u7684\u51e0\u79cd\u65b9\u6cd5\u548c\u4f18\u52a3<\/font><\/h1>\n<p style=\"text-indent: 2em\">&nbsp;<\/p>\n<p><font size=\"4\">\u5408\u7406\u7684\u8fd0\u7528\u56fe\u7247\uff0c\u80fd\u591f\u4f7f\u7ad9\u70b9\u66f4\u52a0\u4e30\u5bcc\u591a\u5f69\uff0c\u76f8\u4fe1\u6709\u8bb8\u591a\u559c\u6b22\u7528\u56fe\u7247\u7684\u8bbe\u8ba1\u5e08\u90fd\u9047\u5230\u8fc7\u4e00\u4e2a\u95ee\u9898\uff1a\u7528\u56fe\u7247\u5b9e\u73b0\u8868\u5355(form)\u7684\u91cd\u7f6e(reset)\u6309\u94ae\u65f6\uff0c\u8fd9\u4e2a\u6309\u94ae\u5e76\u4e0d\u80fd\u91cd\u7f6e\u8868\u5355\uff0c\u76f8\u53cd\u5374\u6267\u884c\u4e86\u63d0\u4ea4\u8868\u5355\u7684\u64cd\u4f5c\uff0c\u672c\u6587\u8bf4\u660e\u4e86\u8fd9\u4e2a\u95ee\u9898\u7684\u539f\u56e0\uff0c\u5e76\u7ed9\u51fa\u4e86\u76f8\u5e94\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/font><\/p>\n<p><font size=\"4\">\u51fa\u73b0\u4e0a\u8ff0\u95ee\u9898\u7684\u539f\u56e0\u4e3b\u8981\u662f\uff1a\u666e\u901a\u7684\u6309\u94ae\u662f\u901a\u8fc7\u7c7b\u578b\u6765\u533a\u5206\u7684\uff0csubmit \u4e3a\u63d0\u4ea4\u6309\u94ae\uff0creset \u4e3a\u91cd\u7f6e\u6309\u94ae\uff0c\u800c\u7c7b\u578b\u4e3a\u56fe\u7247(type=&quot;image&quot;)\u7684\u6309\u94ae\uff0c\u5176\u9ed8\u8ba4\u64cd\u4f5c\u662f\u63d0\u4ea4\u8868\u5355\u3002\u56e0\u6b64\uff0c\u5982\u679c\u60f3\u7528\u56fe\u7247\u5b9e\u73b0\u91cd\u7f6e\u6309\u94ae\uff0c\u5c31\u9700\u8981\u4e00\u4e9b\u989d\u5916\u7684\u8bbe\u7f6e\u4e86\u3002<br \/>\n\u5982\u679c\u60f3\u7528\u56fe\u7247\u4ee3\u66ff\u91cd\u7f6e\u6309\u94ae\uff0c\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u65b9\u6cd5\uff1a<\/font><\/p>\n<p><font size=\"4\">\uff081\uff09\u7ed9 type \u4e3a image \u7684 input \u6dfb\u52a0 on<wbr><\/wbr>click \u4e8b\u4ef6\u6765\u5b9e\u73b0\u91cd\u7f6e\uff0c\u5e76\u901a\u8fc7\u6dfb\u52a0 return false \u6765\u907f\u514d\u9ed8\u8ba4\u7684\u63d0\u4ea4\u64cd\u4f5c\uff1a<\/font><\/p>\n<p><font size=\"4\">&lt;form method=&quot;post&quot; name=&quot;testForm_2&quot; act<wbr><\/wbr>ion=&quot;&quot;&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;keyword&quot; \/&gt;&lt;\/p&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;input type=&quot;image&quot; src=&quot;send.gif&quot; \/&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;input type=&quot;image&quot; src=&quot;reset.gif&quot; on<wbr><\/wbr>click=&quot;javas<wbr><\/wbr>cript:document.forms[&#8216;testForm_2&#8217;].reset(); return false;&quot; \/&gt;<br \/>\n&lt;\/form&gt;<\/font><\/p>\n<p><font size=\"4\">document.forms[&#8216;testForm_2&#8217;].reset(); \u662f\u5c06\u540d\u79f0\u4e3a testForm_2 \u7684\u8868\u5355\u91cd\u7f6e\u3002<br \/>\nreturn false; \u662f\u9632\u6b62\u63d0\u4ea4\u8868\u5355\u3002<\/font><\/p>\n<p><font size=\"4\">\uff082\uff09\u76f4\u63a5\u7528\u56fe\u7247\u6a21\u62df\u7684\u91cd\u7f6e\u6309\u94ae<\/font><\/p>\n<p><font size=\"4\">&lt;form method=&quot;post&quot; name=&quot;testForm_3&quot; act<wbr><\/wbr>ion=&quot;&quot;&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;keyword&quot; \/&gt;&lt;\/p&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;input type=&quot;image&quot; src=&quot;send.gif&quot; \/&gt;<br \/>\n<wbr><\/wbr><wbr><\/wbr><wbr><\/wbr>&lt;img src=&quot;reset.gif&quot; alt=&quot;Reset&quot; on<wbr><\/wbr>click=&quot;javas<wbr><\/wbr>cript:document.forms[&#8216;testForm_3&#8217;].reset();&quot; style=&quot;cursor:pointer;&quot; \/&gt;<br \/>\n&lt;\/form&gt;<\/font><\/p>\n<p><font size=\"4\">document.forms[&#8216;testForm_2&#8217;].reset(); \u662f\u5c06\u540d\u79f0\u4e3a testForm_2 \u7684\u8868\u5355\u91cd\u7f6e\u3002<\/font><\/p>\n<p><font size=\"4\">style=&quot;cursor:pointer;&quot; \u8bbe\u7f6e\u56fe\u7247\u60ac\u505c\u65f6\uff0c\u663e\u793a\u624b\u578b\u5149\u6807\u3002<\/font><\/p>\n<p><font size=\"4\">\u4e24\u79cd\u65b9\u6cd5\u5927\u540c\u5c0f\u5f02\uff0c\u5728 javas<wbr><\/wbr>cript \u88ab\u7981\u6b62\u7684\u60c5\u51b5\u4e0b\uff0c\u7b2c\u4e8c\u79cd\u65b9\u6cd5\u6309\u94ae\u4e0d\u4f1a\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\uff0c\u800c\u7b2c\u4e00\u79cd\u65b9\u6cd5\u5374\u4f1a\u6267\u884c\u63d0\u4ea4\u64cd\u4f5c\u3002<\/font><\/p>\n<p><font size=\"4\">\u5f53\u7136\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u76f4\u63a5\u628a\u6837\u5f0f\u4ea4\u7ed9 CSS \u53bb\u5904\u7406\uff0c\u7528\u80cc\u666f\u56fe\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\uff0c\u4f46\u662f\u8fd9\u6837\u9700\u8981\u5c06 value \u7684\u503c\u7559\u7a7a\uff0c\u5982\u679c CSS \u88ab\u7981\u6b62\uff0c\u90a3\u4e48\u5c06\u4f1a\u663e\u793a\u4e00\u4e2a\u6ca1\u6709\u6587\u5b57\u7684\u6309\u94ae\uff0c\u6bcf\u4e2a\u65b9\u6cd5\u90fd\u6709\u81ea\u5df1\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u6765\u9009\u62e9\u89e3\u51b3\u65b9\u6848\u3002<\/font><\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u56fe\u7247\u505a\u63d0\u4ea4\u6309\u94ae\u548c\u91cd\u7f6e\u6309\u94ae &nbsp; 1. &lt;input type=image src=&quot;web-pic\/submit.jpg&quot; onClick = &quot; return form1_onsubmit()&#038;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-610","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=610"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/610\/revisions"}],"predecessor-version":[{"id":66478,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/610\/revisions\/66478"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=610"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=610"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}