热门

最新

红包

立Flag

投票

同城

我的

发布
m0_58528446
发发发叶
5 年前
truem0_58528446

用户名密码登录
<style>
.box4{width: 400px;
height: 400px;
margin-top:150px ;
margin-left:500px;
/* margin-right:150px; */
border-color: black;}
</style>
<script>
function myFunction()
{ alert("保存成功!请登录");}
</script>
</head>
<body>
<div class="box4" type = "center" >
<style type = text/css>
body{background-image:url(img/bg.png);}
</style>
<form method="get" action="###" name="myform" onsubmit="checkpost()">
<label for="name">用户名:   </label><input type = "text" name = "name" id="name"/><br>
<br>
<br>
<label for="pw">密   码:   </label><input type = "password" name = "pw" id="pw"/><br>
<br>
<input type = "submit" value = "登录"/>
      
<button onclick="myFunction()">保存</button>
</div>
</form>
<script>
function checkpost(){
if(document.forms[0].name.value=="用户名"&&document.forms[0].pw.value=="密码"){
action="跳转地址";
}else{alert("用户名或密码不正确!")
return false;}}
</script>
</div>

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
如何?
立即登录