获取radio(单选框)值

<input type="radio" name="view_type" style="height: 15px; width: 15px;" checked value="perct"/><label style="color: #fff;">利用率</label>
<input type="radio" name="view_type"  style="height: 15px; width: 15px;" value="sendNum"/><label style="color: #fff;">总量</label> 
<input type="radio" name="view_type"  style="height: 15px; width: 15px;" value="trainNum"/> <label style="color: #fff;">车数</label>
$(":radio").click(function(){
 
 
	var radioType=$('input:radio[name="view_type"]:checked').val();
});

猜你喜欢

转载自blog.csdn.net/wang_ouyangsima/article/details/77981502