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