52,797
社区成员
发帖
与我相关
我的任务
分享
<script>
function submit2other(form2) {
var $form = $(form2);/////////////
if ($form.find(':checked').size() == 0) {
alert('选一个可以吗?!');
return false;
}
var actor = [];
$form.find('.actor :checked').each(function (index, element) {
actor.push($(this).val());
});
$form.find('[name="star"]').val(actor.join('+'));
var classification = [];
$form.find('.classification :checked').each(function (index, element) {
classification.push($(this).val());
});
$form.find('[name="leibie"]').val(classification.join('+'));
if (window.XMLHttpRequest) {
var xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
return false;
}
}
} else {
return false;
}
postd = "star=" + form2.star.value + "&leibie=" + form2.leibie.value;
//alert('为什么取不到值呢?');
alert(postd);
xmlhttp.open("POST", "my_search_check2.asp", true);
xmlhttp.setRequestHeader("Content-Length", postd.length);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send(postd);
return true;
}
</script>