<%List<String> list = (List<String>) request.getAttribute("list");List<String> listjsp = (List<String>) request.getAttribute("listjsp");%>//button按钮的上一页、下一页function getButtonHref(actionType , localHref){var targetURL = "";var targetArray = new Array();alert(localHref);<%for (int i = 0; i < list.size(); i++) {%>var ss = localHref.replace(<%=listjsp.get(i)%> , localHref.substring(localHref.lastIndexOf('/') + 1,localHref.indexOf('?'));targetArray.push(ss);<%}%>for(var i = 0 ; i < targetArray.length ; i++){alert(targetArray[i]);}$("div[align='top'] a").each(function(i){var target = $(this).attr("href");var localHrefTemp = localHref.substring(localHref.lastIndexOf('/') + 1,localHref.indexOf('?'));target = target.substring(target.lastIndexOf('/') + 1,target.indexOf('?'));if(target.indexOf(localHrefTemp) != -1){if(i > 0 && "PrevPage" == actionType){targetURL = targetArray[i-1];}else if(i < $(this).length && "NextPage" == actionType){targetURL = targetArray[i+1];}else{alert("跳转错误");}<%=listjsp.get(i)%>告诉我不是字符串的类型,我加上"也不好使",请问怎么解决啊,谢谢}});return targetURL;}
添加回答
举报
0/150
提交
取消