jQuery.noConflict();

var $$=jQuery.noConflict();
function getTableData() {
var dataStr = "";
var lastSeq = $$("#data_table>tbody>tr").length;//最后一行的序号
var cur = $$("#data_table>tbody>tr:first");//列表第一行(去除标题栏)
for ( var i = 1; i < lastSeq; i++) {
cur = cur.next("tr");
//取得各个字段的值
var deptId=cur.find("select[name='attempDept.deptName']").val();
var deptName = cur.find("select[name='attempDept.deptName']").find('option:selected').text();
//var deptName=cur.find("select[name='attempDept.deptName']").selectedIndex.text();
var substationId=cur.find("input[name='attempDept.substationId']").val();
var substationName = cur.find("input[name='attempDept.substation']").val();
var oid = cur.find("input[name = 'trOid']").val();
var content = cur.find("textarea[name='content']").html();
var orderNum = cur.find("label").text();
var commonNum = cur.find("input[name='commonNum']").val();
var thisData =deptId+"}"+substationId+"}"+oid+"}"+orderNum+"}"+content+"}"+deptName+"}"+substationName+"}"+commonNum;
dataStr = dataStr + "::" + thisData ;
}
dataStr = dataStr.substring(2);
document.getElementById("tableData").value=dataStr;
return dataStr;
}

你可能感兴趣的:(jquery)