js中获取asp变量并判断页码,根据按扭测试进入下一页的

山东蓝鸟贵薪 2020-08-21 05:08:33
文件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;
}
}
...全文
23577 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
山东蓝鸟贵薪 2020-08-31
  • 打赏
  • 举报
回复
问题已搞定了
山东蓝鸟贵薪 2020-08-26
  • 打赏
  • 举报
回复
引用 2 楼 Rimifon 的回复:
大哥 13年 码龄。
temp_epage_add_1_value 这个是服务器端返回的? 1 + 1 = 11 ? 11+1 = 111?所以第三次是第111页,直接跳到最后一页了?


能不能愉快的聊天了啦,我不做  大哥 好多年,所谓 码龄 ,我也是有空就学习学习的,我还C/S模式的程序,但是 我大专学过ASP的,有空就出来研究研究的
山东蓝鸟贵薪 2020-08-26
  • 打赏
  • 举报
回复
谢谢赐教
我将 temp_epage_sub_1_value = '<% =temp_epage_sub_1 %>';
修改为:
temp_epage_sub_1_value = <% =temp_epage_sub_1 %>;

就好了
山东蓝鸟贵薪 2020-08-22
  • 打赏
  • 举报
回复


现在的问题是: temp_epage_add_1_value  变量大于3后,就直接跳转到 最后一条记录,这个BUG如何修改

Rimifon 2020-08-22
  • 打赏
  • 举报
回复
大哥 13年 码龄。
temp_epage_add_1_value 这个是服务器端返回的? 1 + 1 = 11 ? 11+1 = 111?所以第三次是第111页,直接跳到最后一页了?

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧