开发者

Django Form Template Button

开发者 https://www.devze.com 2023-01-11 08:00 出处:网络
Django accepts and works with form button in format: <input type=\"submit\" value=\"Submit\" /> How to make it to work with the following:

Django accepts and works with form button in format:

<input type="submit" value="Submit" />

How to make it to work with the following:

<button type="button">Submit开发者_JAVA技巧</button>


Could you explain what exactly you mean by "Django accepts and works with form button in format"? As far as I know the difference in the behaviour of <input type="submit" .../> and <button type="button">... has nothing to do with Django. Django does not care how a form is submitted from the browser.

This previously posted question might be of interest.


Add the following to the button to submit the form: ("myform" is the id of your form)

onClick="javascript.document.myform.submit();"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号