Posted in Javascript onAugust 05, 2013
以下是示例图:
以下是代码:
function forward() { //对发送内容拼接字符串,整理之后发送. var temp = ""; var array = new Array(); $("#yxdwlb tr").each(function(){ var flag = false; var user = ""; $(this).find("td").each(function(n){ if(n == 0){ //user = user + $(this).find("input").is(":checked") +"," ; flag = $(this).find("input").is(":checked"); } if(n == 1){ user = user + this.innerText + ",";} if(n == 2){ user = user + $(this).find("input").val() + ",";} if(n == 3){ user = user + $(this).find("input").is(":checked") + ",";} if(n == 4){ user = user + $(this).find("input").is(":checked")+ ";";} });//列 if(flag == true){ array.push(user); } });//行 for(var i = 0 ;i<array.length;i++) { temp = temp + array[i];//把数组的原素拼装成字符串存入temp变量, } $("#array").val(temp);//temp变量存入参数array //description不为空的判断 var description=jQuery("#description").val(); if(trim(description)=='') { triman.alert("请输入描述内容!"); return; } //获得表单内容并转发 var doc = document.getElementById("document"); doc.action = "${pageContext.request.contextPath}/documentManager/save"; doc.method = "post"; doc.submit(); }
js实现页面转发功能示例代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@