差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| study:javascript:jquery:select [2012/05/31 05:37] – [access selected value] banana | study:javascript:jquery:select [2021/03/03 01:30] (現在) – [Test Page] banana | ||
|---|---|---|---|
| 行 3: | 行 3: | ||
| まずはデモから見てみよう。 | まずはデモから見てみよう。 | ||
| - | ===== Test Page ===== | + | ===== Test Page ===== |
| < | < | ||
| < | < | ||
| 行 90: | 行 90: | ||
| function showIndex() { | function showIndex() { | ||
| alert($("# | alert($("# | ||
| + | } | ||
| + | |||
| + | function setValue() { | ||
| + | // | ||
| + | $(" | ||
| + | $(" | ||
| + | } | ||
| + | |||
| + | function queChange(obj) { | ||
| + | var selected = $(obj).get(0).selectedIndex; | ||
| + | $(obj).find(" | ||
| } | } | ||
| 行 96: | 行 107: | ||
| </ | </ | ||
| < | < | ||
| - | <select id=" | + | <select id=" |
| <option value=" | <option value=" | ||
| <option value=" | <option value=" | ||
| 行 104: | 行 115: | ||
| <input type=" | <input type=" | ||
| <input type=" | <input type=" | ||
| + | <input type=" | ||
| </ | </ | ||
| 行 112: | 行 124: | ||
| $("# | $("# | ||
| $("# | $("# | ||
| + | $("# | ||
| </ | </ | ||