首页 > 代码库 > 关于 radio 值的获取 选中事件

关于 radio 值的获取 选中事件

技术分享
 1 <div class="col-md-12">
 2             <div class="col-md-3">
 3                 <input type="radio" name="kdgs" id="huitong" value="huitong" /> <label for="huitong">百世汇通<img src="https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=3908228140,1288170988&fm=58" /> </label>
 4             </div>
 5             <div class="col-md-3">
 6                 <input type="radio" name="kdgs" id="shentong" value="shentong" /> <label for="shentong">申通快递<img src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=3696414240,752471806&fm=58" /> </label>
 7             </div>
 8             <div class="col-md-3">
 9                 <input type="radio" name="kdgs" id="huitong" value="huitong" /> <label for="huitong">百世汇通<img src="https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=3908228140,1288170988&fm=58" /> </label>
10             </div>
11             <div class="col-md-3">
12                 <input type="radio" name="kdgs" id="huitong" value="huitong" /> <label for="huitong">百世汇通<img src="https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=3908228140,1288170988&fm=58" /> </label>
13             </div>
14         </div>
View Code
技术分享
1 <script>
2     $(input[name="kdgs"]).change(function () {
3         $("#dh").removeClass("hidden").addClass("show");
4     });
5 </script>
View Code

 

关于 radio 值的获取 选中事件