onclick傳遞多個參數

<div class="am-list-news-ft">                
                    <button class="btn btn-success" onclick="upPage('${host}','${type}','${pageIndex}')">«上一頁</button>                                            
                    <button type="submit"  class="btn btn-success" onclick="more('${host}','${type}','${pageIndex}')">下一頁 »</button>
                        
</div>
//上一頁
	function upPage(host,type,pageIndex) {
		/* alert("上一頁") */
		pageIndex=parseInt(pageIndex)-parseInt(1);
		/* alert(pageIndex); */
		window.location.href="<%=context%>/weChatEventReport/weChatEventReportList.action?host="+host+"&type="+type+"&pageIndex="+pageIndex;		
	}
	
	//查看更多
	function more(host,type,pageIndex) {
		/* alert("下一頁") */
		
		pageIndex=parseInt(pageIndex)+parseInt(1);
		
		/* alert(pageIndex); */
		window.location.href="<%=context%>/weChatEventReport/weChatEventReportList.action?host="+host+"&type="+type+"&pageIndex="+pageIndex;		
	}



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章