var value = window.parent.opener.document.getElementById(id "txt_dept_name").value; var keys = window.parent.opener.document.getElementById(id "hf_ids").value;
var ary = checkid.value.split("|"); var newsValues = ary[0]; var newsKeys = ary[1];
if (checkid.checked) { values = Value "," newsValues; keys = keys "," newsKeys;
} //轉換成資料庫,去掉重複,再組合好。 。 // 去重的演算法 var json = {}; for (var i = 0; i if (ary[i] != "") {
json["a" ary [我]] = ary[i]; } }
// 看結果 var str2 = ""; for (var key in json) { str2 = "," json[key]; }
var s = str2.toString();
//去掉第一個逗號 if (s.substr(0, 1) == ',') { s = s.substr(1); }
回傳 s; }
function add_all() { var ck = document.getElementsByTagName("input"); for (i = 0; i if (ck[i].type == "checkbox") { ck[i].checked = true; checkRe(ck[i]);
} }
}
function del_all() { var id = window.parent.getQry("ctrid") "_"; window.parent.opener.document.getElementById(id "txt_dept_name").value = ""; window.parent.opener.document.getElementById(id "hf_ids").value = "";
var ck = document.getElementsByTagName("input"); for (i = 0; i if (ck[i].type == "checkbox") { ck[i].checked = false;