<script type="text/javascript">
$(document).ready(function(){
$("#b01").click(function(){
var workers = new Array();
var w = document.getElementsByName("workerlist");
for (i=0;i<w.length;i++)
{
if(w[i].checked) {workers.push(w[i].value)}
}
var rwplist = new Array();
var sRwp = document.getElementsByName("sqrwp");
for (i=0;i<sRwp.length;i++)
{
if(sRwp[i].checked) {rwplist.push(sRwp[i].value)}
}
var list = JSON.stringify({"list1":workers,
"list2":rwplist});
$.ajax({
type:'POST',
url:"${ctx }/rwp/sq2",
contentType : 'application/json',
data: list,
async:true, // 异步请求
cache:false, // 设置为 false 将不缓存此页面
});
});
});
</script>
纪念一下我的AJAX ,传递多个参数!!!
最新推荐文章于 2022-10-17 09:14:14 发布