表单操作不适用于Android或iOS

时间:2018-11-05 07:23:14

标签: html forms mobile

我正在一个原型网站上。它具有如下所示的简单登录表单。它在笔记本电脑上工作正常。它不适用于iOS(使用Chrome和Safari的v11.2.6)或我的Chromebook(v69.0.3497.95)。

<div class="form-popup" id="loginForm" align="center" >
    <form action="Login.php" method="post" class="form-container">
        <h1>Login</h1>

        <label for="email"><b>Email</b></label>
        <input type="text" placeholder="Enter Email" name="email" required>

        <label for="psw"><b>Password</b></label>
        <input type="password" placeholder="Enter Password" name="psw" required>

        <input type="submit" class="btn" value="Login">
        <input type="button" class="btn cancel" onclick="closeLoginForm()" value="Close">
    </form>
</div>

1 个答案:

答案 0 :(得分:0)

U可以使用引导程序表单。

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>FORM</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>

<body>
    <div class="container">
        <div id="loginForm">
            <form class="form-popup">
                <div class="form-group">
                    <label for="email">Email address:</label>
                    <input type="email" class="form-control" id="email">
                </div>
                <div class="form-group">
                    <label for="pws">Password:</label>
                    <input type="password" class="form-control" id="pws">
                </div>
                <button type="submit" class="btn btn-info" value="login">Submit</button>
            </form>
        </div>
        <br>
        <button type="button" class="btn btn-primary cancel" id="formButton">Close!</button>
    </div>
    <script>
    $(document).ready(function() {
        $("#formButton").click(function() {
            $("#loginForm").toggle();
        });

    });
    </script>
</body>

</html>