<!-- p, td { line-height: 1.3; } p { padding-bottom: 1em; } a { color: #3697b3; font-weight: bold; text-decoration: none; } a:hover { color: #000; text-decoration: underline; } a:active { color: #000; text-decoration: underline; } --> <div style="font-size:12px;color:#262626;line-height:1.3;font-family:Arial, Helvetica, sans-serif;background-color:#fff;"> <div class="ennote"> <div>假設 DropDownList ID 為 DropDownList1<span> </span></div> <div> </div> <div>取得 DropDownList 選中的<span style="color: #2d4fc9;">文字</span></div> $('#DropDownList1 <span style="color: #8600a4;">option:selected</span>').<span style="color: #e30000;">text</span>(); <div> </div> <div><span style="border-collapse: separate; color: #000000; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">取得 DropDownList 選中的</span><span style="border-collapse: separate; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="color: #2d4fc9;">內容</span></span></div> <div><span style="border-collapse: separate; color: #000000; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">$('#DropDownList1</span> <span style="border-collapse: separate; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="color: #8600a4;">option:selected</span></span><span style="border-collapse: separate; color: #000000; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">').</span><span style="border-collapse: separate; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="color: #e30000;">val</span></span><span style="border-collapse: separate; color: #000000; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">();</span></div> <div><span style="border-collapse: separate; color: #000000; font-family: 微軟正黑體; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </span></div> <div><span style="color: #8600a4;">option:selected</span> = 目前所選取的</div> </div> </div>