<input id="num" class="arrive_page" type="text"><a id="fj_btn" href="javascript:;">确定</a>
//回撤
$('.arrive_page').bind('keyup',function(event){
var partten = /^d+$/;
if(!partten.test($(this).val())){
$(this).val('');
}else{
if(event.keyCode == "13")
{
var ppge = $(this).val();
var hr = $('.digg').find('a').attr('href');
var msg = hr.substring(0, hr.lastIndexOf('='));
var pp = $('.digg').attr('lang');
if(parseInt(ppge) > parseInt(pp) ){
ppge=1;
}
var url = msg+'='+ppge;
window.location.href=url;
}
}
});
//点击确定按钮
$("#fj_btn").click(function(){
var ppge = $("#num").val();
var hr = $('.digg').find('a').attr('href');
var msg = hr.substring(0, hr.lastIndexOf('='));
var pp = $('.digg').attr('lang');
if(parseInt(ppge) > parseInt(pp) ){
ppge=1;
}
var url = msg+'='+ppge;
window.location.href=url;
})