如果html為 <input type="radio" id="test" name="test" value="1" /><span>測試1</span>則js為:$("input[name='test']:checked").next("span").text() 如果html為 <input ...
如果html為 <input type="radio" id="test" name="test" value="1" /><span>測試1</span>
則js為:$("input[name='
test
']:checked").next("span").text()
如果html為
<input type="radio" id="
test
" name="
test
" value="1" /> <label for="
test
">測試1</label>
<input type="radio" id="test1" name="test" value="2" /> <label for="test1">測試2</label>
則js為:$("input[name='test']:checked").next("label").text()