扫码关注官方订阅号
<input type="radio">按钮1<input type="radio">按钮2
<button>确认</button><button>取消</button>
当选择input1 时点击确认 弹出模态框1 当选择input2 时点击确认 弹出模态框2 js如何做?
认证0级讲师
$('button').click(function(){
if($(':radio:checked').val()==1){ ... }
});
点击确认的时候,判断选中的是哪个radio,并根据不同的结果弹出不同的框。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
$('button').click(function(){
});
点击确认的时候,判断选中的是哪个radio,并根据不同的结果弹出不同的框。