Chr*_*ris 12 javascript jquery radio-button
我有以下单选按钮,默认情况下都没有选中.
<input type="radio" name="location" value="0" /> home
<input type="radio" name="location" value="1" /> work
<input type="radio" name="location" value="2" /> school
如何检测其中任何一个被检查.我正在寻找像点击这样的东西,但它不起作用
$("input[name=location]").click(function(){
    alert("selected");
}); 
Dar*_*rov 12
$('input[name=location]').change(function(){
    alert(this.checked);
});
| 归档时间: | 
 | 
| 查看次数: | 23274 次 | 
| 最近记录: |