如何使用不同的复选框确保不同的选项

我需要为我的网站找到解决方案。 我有更多复选框选项,根据复选框我决定检查我想从脚本中获得不同的选项。 例如,如果我选中值为1的复选框,我想获得报价Ping。 请问有人帮我解决如何用JavaScript或jQuery编写的问题。 非常感谢!

Ping Basic info Restart modules

为了更好地解释它..谢谢你们的答案,但解释一下,我只是在小提琴中制作了一个实时代码。 让我说我有这个代码http://jsfiddle.net/krizvite/t8k4fc11/ `我想制作一个脚本来执行此操作:如果我选中复选框苹果或蓝莓,我想只选择mash选项。 如果我选择黑莓,我想选择粉碎方法,例如,如果我使用橙色,我想要有选择。 你能帮助我吗?

试试这个

 $(function() { $("input[type='checkbox']").change(function() { // check if currently click was to make it checked if (this.checked) { // get value of current checkbox alert(this.value); } }); }); 
       

试试.change

例如

 $("#infos").change(function() { if(this.checked) { alert('infos is checked'); } }); 
 window.jQuery(document).ready(function() { $('body').on('change', "input[type='checkbox']", function() { if (this.checked) { // get value of current checkbox alert(this.value); } }); }); 

我刚刚测试过它现在工作了! 我的问题是用show(),hide()函数解决的。