function update(oppId,offIds){ window.location.href = contextPath+"/discount/toDiscountShow?oppId="+oppId+"&offIds="+offIds; }
offIds:「10005,10006」javascript
"<a href='javascript:void(0);' onclick='update("+row.oppId+",["+row.offIds.split(",")+"]);'>[修改]</a>"
將offIds切割成數組再傳入參數中java
[row.offIds.split(",")] [] 表示傳入js方法中對應的參數爲數組數組