HTML表单没有操作 [英] HTML Forms without actions
问题描述
在Django / Pinax中,我遇到了以下开始的登录表单:
< form class = loginmethod =POSTaction =>
它工作得很好。所以我假设有一些java脚本或Django框架中的某些东西将值放入action属性中。所以我的问题
a)Django如何插入动作?
b)为什么这样做? / p>
b)如何查看此表单的操作?
更新:我看到这是不是一个Django的东西,但大多数浏览器都是做的。
在大多数浏览器中都有一个空字符串的操作指向表单在浏览器当前已加载的URL上,这是首先提供表单的脚本。
In Django / Pinax, I've come across the login form which starts like this :
<form class="login" method="POST" action="">
It works perfectly well. So I assume that either some java-script or something in the Django framework is putting the value into the action attribute. So my questions ;
a) How does Django insert the action?
b) Why do they do it like this?
b) How can I find out what the action of this form is?
Update : I see this is not a Django thing at all but what most browsers do.
Having an action of an empty string in most browsers points the form at the URL the browser currently has loaded, which is the script that served the form in the first place.
这篇关于HTML表单没有操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!