登陆成功后自动计算秒数执行跳转

时间:2023-10-10 19:47:59 

login.html


<script language = "javascript" type = "text/javascript">
function $(id){
return document.getElementById(id);
}

function checkUser(){
if($("u1").value == "hello" && $("p1").value == "123"){
return true;
}else{
return false;
}
}
</script>
<form action = "ok.html">
<div style = "width:300px;height:200px;border:1px solid red;background-color:pink">
<p/>
U:<input id = "u1" type = "text" value = "" /> <br><br>
P:<input id = "p1" type = "text" value = "" /> <br><br>
<input type = "submit" onclick = "return checkUser()" value = "登陆" style = "margin-left:20px"/>
</div>
</form>


ok.html


<script language = "javascript" type = "text/javascript">
setTimeout("javascript:clearInterval(mytime);window.open('manage.html')",5000);
function changeSec(){
document.getElementById("myspan").innerText =
parseInt(document.getElementById("myspan").innerText) - 1;
}
var mytime = setInterval("changeSec()",1000);
</script>
登陆成功 <span id = "myspan">5</span> 秒钟后自动跳转...


manage.html


welcome

 
登陆成功后自动计算秒数执行跳转 

标签:登陆成功,自动查秒,跳转
0
投稿

猜你喜欢

  • Python中使用__new__实现单例模式并解析

    2021-10-29 23:11:22
  • Python 面向切面编程 AOP 及装饰器

    2021-05-07 14:16:36
  • SqlServer数据库全角转换成半角

    2024-01-21 11:20:39
  • ORACLE 自动提交问题

    2009-06-19 17:58:00
  • CSS3变换入门

    2010-01-30 13:29:00
  • python连接MySQL、MongoDB、Redis、memcache等数据库的方法

    2024-01-13 15:35:25
  • wxPython实现整点报时

    2023-06-11 05:25:39
  • pytorch visdom安装开启及使用方法

    2023-11-27 06:39:41
  • 解读ASP.NET 5 & MVC6系列教程(12):基于Lamda表达式的强类型Routing实现

    2023-06-28 15:17:35
  • python程序 线程队列queue使用方法解析

    2021-11-16 18:43:02
  • Python3.10新特性之match语句示例详解

    2023-07-23 05:17:23
  • python迷宫问题深度优先遍历实例

    2023-10-16 18:54:06
  • Python测试框架pytest核心库pluggy详解

    2023-11-01 23:02:08
  • pytorch 使用半精度模型部署的操作

    2022-04-17 21:33:36
  • python多进程下的生产者和消费者模型

    2022-05-30 02:37:07
  • asp函数收藏

    2009-04-21 13:10:00
  • python+opencv实现动态物体识别

    2023-10-31 01:15:00
  • python中__init__()方法详情

    2023-06-05 21:22:46
  • PHP中流的定义及作用详解

    2023-05-31 11:33:59
  • WEB手绘稿常用元素 之 箭头

    2009-05-08 12:33:00
  • asp之家 网络编程 m.aspxhome.com