") } function toPage(){ var _num = document.getElementById("num").value; var str = "t20141127_4254763"+"_"+(_num-1)+"."+"htm"; var url = location.href.substring(0,location.href.lastIndexOf("/")+1); if(_num<=1||_num==null) location.href = url+"t20141127_4254763"+"."+"htm"; else if(_num>countPage) alert("本篇文章最多"+countPage+"頁"); else location.href = url+str; } -->