{"id":2289,"date":"2024-11-10T14:34:36","date_gmt":"2024-11-10T06:34:36","guid":{"rendered":"https:\/\/fwq.ai\/blog\/2289\/"},"modified":"2024-11-10T14:34:36","modified_gmt":"2024-11-10T06:34:36","slug":"c-%e4%b8%ad%e5%a6%82%e4%bd%95%e6%a0%b9%e6%8d%aedropdownlist%e6%8e%a7%e4%bb%b6%e7%9a%84%e9%80%89%e6%8b%a9%e5%90%af%e7%94%a8%e6%88%96%e7%a6%81%e7%94%a8%e5%8f%a6%e4%b8%80%e4%b8%aadropdownlist%e6%8e%a7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/2289\/","title":{"rendered":"C# \u4e2d\u5982\u4f55\u6839\u636eDropDownList\u63a7\u4ef6\u7684\u9009\u62e9\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2aDropDownList\u63a7\u4ef6?"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173070739855928.jpg\" class=\"aligncenter\" title=\"C# \u4e2d\u5982\u4f55\u6839\u636eDropDownList\u63a7\u4ef6\u7684\u9009\u62e9\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2aDropDownList\u63a7\u4ef6?\u63d2\u56fe\" alt=\"C# \u4e2d\u5982\u4f55\u6839\u636eDropDownList\u63a7\u4ef6\u7684\u9009\u62e9\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2aDropDownList\u63a7\u4ef6?\u63d2\u56fe\" \/><\/p>\n<p><strong> \u4e2d\u4e00\u4e2a\u7b80\u5355\u7684dropdownlist\u63a7\u4ef6\u8bbe\u7f6e\u95ee\u9898<\/strong><\/p>\n<p>\u5982\u4f55\u8bbe\u7f6easpx\u9875\u9762\u4e2d\u4e00\u4e2adropdownlist\u63a7\u4ef6\u7684\u5c5e\u6027\uff0c\u5728\u9009\u62e9\u67d0\u4e2a\u9009\u9879\u65f6\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2adropdownlist\u63a7\u4ef6\uff1f<\/p>\n<p>\u9996\u5148\uff0c\u63a7\u4ef6\u7684\u8bbe\u7f6e\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;!-- \u5f00\u59cb\u65f6\u95f4 --&gt;\n&lt;asp:dropdownlist runat=\"server\" id=\"ddlstartyear\" onchange=\"setuptime()\" width=\"180px\" \/&gt;\n&lt;asp:dropdownlist runat=\"server\" id=\"ddlstartmonth\" width=\"100px\" enabled=\"false\" \/&gt;\n\n&lt;!-- \u7ed3\u675f\u65f6\u95f4 --&gt;\n&lt;asp:dropdownlist runat=\"server\" id=\"ddlendyear\" onchange=\"setuptime()\" width=\"180px\" \/&gt;\n&lt;asp:dropdownlist runat=\"server\" id=\"ddlendmonth\" width=\"100px\" enabled=\"false\" \/&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u540d\u4e3a\u201cddlstartmonth\u201d\u548c\u201cddlendmonth\u201d\u7684dropdownlist\u63a7\u4ef6\u5904\u4e8e\u7981\u7528\u72b6\u6001\uff08enabled=&#8221;false&#8221;\uff09\u3002<\/p>\n<p>\u901a\u8fc7\u4e00\u4e2ajavascript\u4e8b\u4ef6\uff0c\u5f53\u7528\u6237\u9009\u62e9\u201c\u5e74\u4efd\u201ddropdownlist\u63a7\u4ef6\u4e2d\u7684\u67d0\u4e2a\u9009\u9879\u65f6\uff0c\u6211\u4eec\u9700\u8981\u542f\u7528\u201c\u6708\u4efd\u201ddropdownlist\u63a7\u4ef6\u3002\u4e3a\u4e86\u5904\u7406\u6b64\u4e8b\u4ef6\uff0c\u6211\u4eec\u5728\u201c\u5e74\u4efd\u201ddropdownlist\u63a7\u4ef6\u4e2d\u4f7f\u7528\u201conchange\u201d\u5c5e\u6027\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>&lt;asp:DropDownList runat=\"server\" ID=\"ddlStartYear\" onchange=\"SetUpTime()\" Width=\"180px\" \/&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u9700\u8981\u5728\u4ee3\u7801\u4e2d\u7f16\u5199\u4e00\u4e2a\u201csetuptime\u201d\u51fd\u6570\u6765\u6839\u636e\u9009\u5b9a\u7684\u5e74\u4efd\u8bbe\u7f6e\u201c\u6708\u4efd\u201ddropdownlist\u63a7\u4ef6\u3002\u7136\u800c\uff0c\u4ee3\u7801\u4e2d\u7f3a\u5c11\u4e86\u8fd9\u6bb5\u4ee3\u7801\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fC# \u4e2d\u5982\u4f55\u6839\u636eDropDownList\u63a7\u4ef6\u7684\u9009\u62e9\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2aDropDownList\u63a7\u4ef6?\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2d\u4e00\u4e2a\u7b80\u5355\u7684dropdownlist\u63a7\u4ef6\u8bbe\u7f6e\u95ee\u9898 \u5982\u4f55\u8bbe\u7f6easpx\u9875\u9762\u4e2d\u4e00\u4e2adropdownlist\u63a7\u4ef6\u7684\u5c5e\u6027\uff0c\u5728\u9009\u62e9\u67d0\u4e2a\u9009\u9879\u65f6\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2adropdownlist\u63a7\u4ef6\uff1f \u9996\u5148\uff0c\u63a7\u4ef6\u7684\u8bbe\u7f6e\u5982\u4e0b\uff1a &lt;!&#8211; \u5f00\u59cb\u65f6\u95f4 &#8211;&gt; &lt;asp:dropdownlist runat=&#8221;server&#8221; id=&#8221;ddlstartyear&#8221; onchange=&#8221;setuptime()&#8221; width=&#8221;180px&#8221; \/&gt; &lt;asp:dropdownlist runat=&#8221;server&#8221; id=&#8221;ddlstartmonth&#8221; width=&#8221;100px&#8221; enabled=&#8221;false&#8221; \/&gt; &lt;!&#8211; \u7ed3\u675f\u65f6\u95f4 &#8211;&gt; &lt;asp:dropdownlist runat=&#8221;server&#8221; id=&#8221;ddlendyear&#8221; onchange=&#8221;setuptime()&#8221; width=&#8221;180px&#8221; \/&gt; &lt;asp:dropdownlist runat=&#8221;server&#8221; id=&#8221;ddlendmonth&#8221; width=&#8221;100px&#8221; enabled=&#8221;false&#8221; \/&gt; \u767b\u5f55\u540e\u590d\u5236 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u540d\u4e3a\u201cddlstartmonth\u201d\u548c\u201cddlendmonth\u201d\u7684dropdownlist\u63a7\u4ef6\u5904\u4e8e\u7981\u7528\u72b6\u6001\uff08enabled=&#8221;false&#8221;\uff09\u3002 \u901a\u8fc7\u4e00\u4e2ajavascript\u4e8b\u4ef6\uff0c\u5f53\u7528\u6237\u9009\u62e9\u201c\u5e74\u4efd\u201ddropdownlist\u63a7\u4ef6\u4e2d\u7684\u67d0\u4e2a\u9009\u9879\u65f6\uff0c\u6211\u4eec\u9700\u8981\u542f\u7528\u201c\u6708\u4efd\u201ddropdownlist\u63a7\u4ef6\u3002\u4e3a\u4e86\u5904\u7406\u6b64\u4e8b\u4ef6\uff0c\u6211\u4eec\u5728\u201c\u5e74\u4efd\u201ddropdownlist\u63a7\u4ef6\u4e2d\u4f7f\u7528\u201conchange\u201d\u5c5e\u6027\uff0c\u5982\u4e0b\u6240\u793a\uff1a &lt;asp:DropDownList runat=&#8221;server&#8221; ID=&#8221;ddlStartYear&#8221; onchange=&#8221;SetUpTime()&#8221; Width=&#8221;180px&#8221; \/&gt; \u767b\u5f55\u540e\u590d\u5236 \u73b0\u5728\uff0c\u6211\u4eec\u9700\u8981\u5728\u4ee3\u7801\u4e2d\u7f16\u5199\u4e00\u4e2a\u201csetuptime\u201d\u51fd\u6570\u6765\u6839\u636e\u9009\u5b9a\u7684\u5e74\u4efd\u8bbe\u7f6e\u201c\u6708\u4efd\u201ddropdownlist\u63a7\u4ef6\u3002\u7136\u800c\uff0c\u4ee3\u7801\u4e2d\u7f3a\u5c11\u4e86\u8fd9\u6bb5\u4ee3\u7801\u3002 \u4ee5\u4e0a\u5c31\u662fC# \u4e2d\u5982\u4f55\u6839\u636eDropDownList\u63a7\u4ef6\u7684\u9009\u62e9\u542f\u7528\u6216\u7981\u7528\u53e6\u4e00\u4e2aDropDownList\u63a7\u4ef6?\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2289","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=2289"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2289\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=2289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=2289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=2289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}