我想在这里获取选中复选框的值,但它是未定义的,因为它变成了一个数组..请帮我怎么做..谢谢..
<form>
<input type="checkbox" value="a" name="letter[]" />
<input type="checkbox" value="b" name="letter[]" />
<input type="checkbox" value="c" name="letter[]" />
<input type="button" value="submit" onclick="rani()" />
</form>
<script>
function rani(){
$.ajax({
type:"post",
url:"ajax.php",
data:{
radha:$("[name=letter]").val(),
},
success:function(msg){
alert(msg);
}
})
}
</script>