cs50 pset7与html输入框和单选框的相似性

时间:2019-01-28 04:29:37

标签: html css twitter-bootstrap

我的输入框有问题,单击该输入框不会检查单选框。我已经尝试通过直接从示例页面https://similarities.cs50.net/less复制html代码来进行尝试,但仍然可以在示例中运行,但在运行flask之后不能在我的版本上运行。

代码相同,但是在我的页面上不起作用,这是什么问题?这是我的链接https://ide50-choi2002003.legacy.cs50.io:8080/

<!DOCTYPE html>

<html lang="en">
    <head>

        <!-- Required meta tags -->
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

        <!-- Bootstrap CSS -->
        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>

        <link href="/static/styles.css" rel="stylesheet"/>

        <title>Similarities</title>

    </head>
    <body>

        <nav class="navbar fixed-top navbar-dark bg-dark">
            <a class="navbar-brand" href="/">Similarities</a>
        </nav>

        <div class="container-fluid">
            <div class="row">


    <div class="col">
        <form action="/compare" enctype="multipart/form-data" method="post">

            <div class="form-group">
                <input class="form-control-file" name="file1" type="file">
            </div>
            <div class="form-group">
                <input class="form-control-file" name="file2" type="file">
            </div>
            <div class="form-group">
                <div class="form-check">
                    <label class="form-check-label">
                        <input class="form-check-input" name="algorithm" type="radio" value="lines">
                        Compare lines
                    </label>
                </div>
                <div class="form-check">
                    <label class="form-check-label">
                        <input class="form-check-input" name="algorithm" type="radio" value="sentences">
                        Compare sentences
                    </label>
                </div>
                <div class="form-check">
                    <label class="form-check-label">
                        <input class="form-check-input" name="algorithm" type="radio" value="substrings">
                        Compare substrings
                        <input class="form-control form-control-sm" min="1" name="length" placeholder="of length n" type="number">
                    </label>
                </div>
            </div>
            <button class="btn btn-primary" type="submit">Compare</button>

        </form>
    </div>


            </div>
        </div>

        <!-- Optional JavaScript -->
        <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>


    </body>
</html>

0 个答案:

没有答案