在下面的代码中有两个函数: OppSelect() 函数正在调用另一个函数,即 exOpp()。现在,如何将 OppSelect() 的“结果”值放入“exOpp()”函数并附加到 url?请帮忙。
JS:
function exOpp() {
alert("inside");
document.forms[0].action = "/Mgmt/ExportOpp?loadData=xls&customerprofile=" + $customerIDH + "&role=" + $roleIDH + "&targetDate=" + $targetDateH + "&actualDate=" + $actualDateH;
document.forms[0].submit();
}
function OppSelect() {
var menu = document.getElementById('selectedServersID').length;
alert(menu);
var result = "";
for (var i = 0; i < menu; i++) {
var selectedcol = document.getElementById('selectedServersID')[i].value;
//var selectedcol = document.getElementById('selectedServersID')[i].innerHTML;
// alert(selectedcol);
if (i > 0) {
result += ',';
}
result += selectedcol;
}
alert(result);
exOpp();
}