js中获取asp变量并判断页码,根据按扭测试进入下一页的
文件asp的
<input type="button" name="Next_page" id="Next_page" value="下一页[debug]" onclick="Next_page_jsShow()"/>
<script type="text/javascript">
{
function Next_page_jsShow() /*下一页*/
{
temp_epage_add_1_value = '<% =temp_epage_add_1 %>';
temp_lastinfos = '<% =temp_rs_pagecount %>' ; //获取页码数 10
alert(" temp_epage_add_1_value当前值为:"+temp_epage_add_1_value +
"\n temp_lastinfos为总[页码]: "+temp_lastinfos );
temp_sql= "index.asp?page="+temp_epage_add_1_value ;
alert("变量temp_sql: " + temp_sql );
window.location.href= temp_sql;
//下面是 根据当前页码 与 获取页码数10 比较,大于就退出的
//但是下面 点击按扭3次后,就直接进入最后一页的
if ( temp_epage_add_1_value >= temp_lastinfos )
{
alert("已到记录尾记录!!!" );
temp_sql= "index.asp?page="+ temp_lastinfos ;
window.location.href = temp_sql ;
return;
}
}