此代码可以正常工作,我单击“发送”,然后立即发送电子邮件。
<form role="form" action="" method="post" class="form-area contact-form text-right" id="myForm">
{% csrf_token %}
<input type="text" name="contact_name" required id="id_contact_name" placeholder="Name: " />
<input type="email" name="contact_email" required id="id_contact_email" placeholder="Email: " />
<textarea placeholder="Message: " name="content" cols="40" rows="10" required id="id_content"></textarea>
<button type="submit">Submit</button>
</form>
但是当我添加div和使它看起来像我想要的东西时,我填写表格,单击“发送”,但没有任何反应,cmd告诉我mail.php 404
ej,这个
<form role="form" action="" method="post" class="form-area contact-form text-right" id="myForm">
{% csrf_token %}
<span class="row">
<span class="col-lg-6 form-group">
<input class="common-input mb-20 form-control" id="form_contact_name" type="text" name="contact_name" required id="id_contact_name" placeholder="Name: " />
<input class="common-input mb-20 form-control" id="form_contact_email" type="email" name="contact_email" required id="id_contact_email" placeholder="Email: " />
</span>
<span class="col-lg-6 form-group">
<textarea class="common-input mb-20 form-control" placeholder="Message: " name="content" cols="40" rows="10" required id="id_content"></textarea>
</span>
<span class="col-lg-12">
<button class="btn btn-outline-success" type="submit">Submit</button>
</span>
</span>
</form>
你们知道为什么吗,据我所知div放入表格时应该不会出现任何问题