gpt4 book ai didi

html - 无法用鼠标选择密码字段! PHP网站问题

转载 作者:行者123 更新时间:2023-11-28 01:21:24 24 4
gpt4 key购买 nike

链接是https://www.agarwalsaraogi.com/emailadmin

我可以点击用户名字段,但不能点击密码字段。要放置焦点,我必须使用键盘上的选项卡按钮。

它之前工作正常,但有一次我尝试输入了错误的密码。在那个错误之后,它不工作了。我从代码中删除了错误消息行,但它仍然无法正常工作。我使用 div 类警报 alert-danger 作为错误消息。

主要问题是手机浏览器无法输入密码

<!DOCTYPE html>
<?php
$error = "";
if(isset($_POST['username'],$_POST['password'])){

/*** You can change username & password ***/
$user = array(
"user" => "abc",
"pass"=>"def"
);
$username = $_POST['username'];
$pass = $_POST['password'];
if($username == $user['user'] && $pass == $user['pass']){
session_start();
$_SESSION['simple_login'] = $username;
header("Location: Email_Manager.php");
exit();
}else{
$error = "Invalid Login Credentials";
echo "<script>alert('".$error."'); window.history.back();</script>";
}
}
?>

<html>
<head>
<link rel="icon" type="image/png" href="favicon.png">
<style>

.footer {
height:60px;
width: 99%;
background-color: Transparent;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: white;
text-align: center;
position: relative;
bottom: 0;
}
.header {
position: absolute;
left: 0;
top: 0;
width: 100%;
/* background-color: #4CAF50; */
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: white;
text-align: center;
}
.tableadjust {
position: fixed;
margin: auto;
width: 60%;
top: 30%;
margin:auto;
}
</style>

<style>


#grad1 {
height: 200px;
background: #2939B3; /* For browsers that do not support gradients */
background: linear-gradient(to right, #1385CC , #2939B3); /* Standard syntax (must be last) */
}
#emails {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
max-width: 512px;
}

#emails td, #emails th {
border: 0px solid #ddd;
padding: 8px;
color: white;
}

/* #emails tr:nth-child(even){background-color: #f2f2f2;} */

/* #emails tr:hover {background-color: #ddd;} */

#emails th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
/* background-color: #4CAF50; */
color: white;

}
input[type=text], input[type=password], input[type=search] {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
padding: 6px 10px;
margin: 3px 0;
box-sizing: border-box;
border-radius: 25px;
}
input[type=button], input[type=Submit], input[type=reset] {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
background-color: Transparent;
border-radius: 25px;
border: 2px solid #FFFFFF;
color: white;
padding: 6px 10px;
text-decoration: none;
margin: 3px 2px;
cursor: pointer;
</style>
<title>
Email Management
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>
<body id="grad1"><center>
<div style="max-width: 512px; width:100%; margin: auto; top: 100px; position: relative;">
<img src="favicon.png"></img>
<table id="emails">
<thead>
<tr><th colspan=2>Login to Email Management
</thead>
<tbody>
<form method=POST action="index.php">
<tr><td>Username: <td><input placeholder="Username" name="username" type="text" style="width:100%">
<tr><td>Password: <td><input placeholder="Password" name="password" type="password" value="" style="width:100%">
<tr><td colspan=2><input type="submit" value="Login" style="width:100%">
</tbody>

</table>

</div>

<footer class="footer"><br> <br> <br> <br> <br>
<p style="width: 100%">Powered by <a href="http://www.byteitcorp.com" style="color:white;">ByteIT Corp</a></p>
</footer>
</center>


<div class="header">
<p><font size=25><b></b>EMAIL MANAGER</b></font></p>
</div>

</body>

</html>

最佳答案

对于您的情况,可以通过删除 position:relative; 来解决问题。来自你的 footer类(class)。下次你应该知道,如果你需要使用 6 <br> ,你做错了什么。 :)

编辑:

  1. 删除position:absolute来自 <font> (您有 EMAIL MANAGER)
  2. 删除position来自 <div style="max-width: 512px; width:100%; margin: auto; top: 100px; position: absolute;">
  3. 移动font上面有 EMAIL MANAGER <div style="max-width: 512px; width:100%; margin: auto; top: 100px; position: absolute;">

关于html - 无法用鼠标选择密码字段! PHP网站问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51468129/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com