弄一个html的登录页面,使用HTML写一个简单的跳转登录页面

最近在学习前端的知识,于是就想写一个简单的页面跳转,必须是勾选了“我同意”这个选项以后才能跳转,否则不能,不废话,直接上代码。

首先是第一个页面:testlogin1.html

html lang="en">

head>

meta charset="UTF-8">

title>Titletitle>

head>

script>

type="text/javascript"

src="http://localhost:63342/python 文件/testlogin.html"

script>

body bgcolor="#ffffff" οnlοad="loadedvar=true;">

form name="terms" action="http://localhost:63342/python 文件/testlogin.html" method="get">

我同意: input type="checkbox" name="agree" value="ON">

input οnclick="if (loadedvar) {if (document.terms.agree.checked) {document.terms.submit();} else {window.alert('kumikoda提示您,必须先同意才能跳转')}} else {window.alert('请稍等...')}" type="button" value="继续">

input type="button" value="退出" οnclick="document.location.href='http://localhost:63342/python 文件/testlogin.html';" >

form>

body>

html>

然后是第二个页面testlogin.html

html>

head>

meta charset="utf-8">

title>登录title>

style>

#login {

width: 290px;

height: auto;

overflow: hidden;

border: solid 1px #CCCCCC;

}

#login_title {

width: 100%;

height: 40px;

line-height: 40px;

background-color: #F60;

text-align: center;

}

.line {

width: 250px;

height: 30px;

line-height: 30px;

margin-left: 20px;

text-align: center;

font-family: 楷体;

}

.line input {

width: 150px;

}

.line a {

font-size: 14px;

color: black;

}

.line span {

color: #F00;

}

#log_submit {

display: block;

width: 200px;

height: 30px;

margin-left: 45px;

margin-top: 15px;

margin-bottom: 5px;

}

style>

head>

body>

form action="#" method="post">

div id="login">

div id="login_title">登 录div>

div class="line">span id="msg">span>div>

div class="line">账号

input name="username" type="text" placeholder="账号/手机/邮箱" />

div>

div class="line">密码

input name="password" type="password" placeholder="请输入密码" />

div>

input id="log_submit" type="submit" value="登录">

div class="line">a href="#">找回密码a>    a href="#">注册账号a>div>

div>

form>

body>

html>

最终结果如下:

fd188d0b51e53229549afa67fdd03ce2.png

c0109f6315c22185b6c82b14bfd7c137.png

呵呵,写的不好的地方,高手勿喷。

  • 10
    点赞
  • 80
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值