翻页函数

[GS=JavaScript]
function gourl(gotourl,pagenum)
{
pageNo=document.getElementById(“URL”).value
if (isNaN(pageNo))
{
alert(“页码必须为数字!”);
return
}
if (pageNo==””)
{
alert(“请填写页码!”);
return
}
if(parseInt(pageNo)>parseInt(pagenum))
{
alert(“请输入有效的页码!”);
return
}
window.location.href=gotourl + pageNo;
}

function onlyNum()
{
if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)||(event.keyCode==8)))
event.returnValue=false;
}
[/GS]

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部