[英]why is web2py custom form, submitting even without {{=form.custom.submit}}?
我不知道發生了什么,但是即使沒有{{=form.custom.submit}}
代碼,我的表單{{=form.custom.submit}}
提交。
{{=form.custom.begin}}
<div>{{=form.custom.widget.id}}</div>
<div>{{=form.custom.widget.details}}</div>
<div id="submit"><button></button></div>
{{=form.custom.end}}
請注意,我只輸入了<div id="sc"><button></button></div>
。
發生了什么事,請告訴我如何解決。
按鈕元素的默認類型為“提交”,因此您的按鈕標簽用作提交按鈕。 如果您不希望它充當“提交”按鈕,則可以將其“類型”屬性顯式設置為除“提交”之外的其他內容,例如“按鈕”或“重置”。
<button type="button"></button>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.