Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 提交登录按钮时,我的网页中没有发生任何事情_Html_Django - Fatal编程技术网

Html 提交登录按钮时,我的网页中没有发生任何事情

Html 提交登录按钮时,我的网页中没有发生任何事情,html,django,Html,Django,我的HTML是 <form method="POST" action="{% url 'lawyerdash' %}"> {% csrf_token %} username<input type="text" name="username"><br> password<input type="password" name="password" ><br> <input type="button"

我的HTML是

<form method="POST" action="{% url 'lawyerdash' %}">
    {% csrf_token %}
    username<input type="text" name="username"><br>
    password<input type="password" name="password" ><br>

    <input type="button" value="sign in" >
单击“登录”后,应转到以下页面lawyerpage.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>welcome {{lawyer.name}}</h1>
</body>
</html>
您应该使用登录而不是键入按钮

您应该使用登录而不是键入按钮

<input type='submit'>Sign In</input>
这才是你真正需要的。按钮类型适用于链接等,因为它只是一个可单击的按钮。重置类型会将页面上的表单重置为其初始值。提交类型将提交您的表单数据


这才是你真正需要的。按钮类型适用于链接等,因为它只是一个可单击的按钮。重置类型会将页面上的表单重置为其初始值。提交类型将提交您的表单数据。

您是否尝试过@Rick Colgan answer。您是否尝试过@Rick Colgan answer.Nice。那么请仔细考虑一下。那么请考虑回答
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>welcome {{lawyer.name}}</h1>
</body>
</html>
<input type='submit'>Sign In</input>