E.5. The form tag

Spring Framework

E.5. The form tag

Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.

表 E.4. Attributes

Attribute Required? Runtime Expression? Description

acceptCharset

false

true

Specifies the list of character encodings for input data that is accepted by the server processing this form. The value is a space- and/or comma-delimited list of charset values. The client must interpret this list as an exclusive-or list, i.e., the server is able to accept any single character encoding per entity received.

action

false

true

HTML Required Attribute

commandName

false

true

Name of the model attribute under which the form object is exposed. Defaults to 'command'.

cssClass

false

true

Equivalent to "class" - HTML Optional Attribute

cssStyle

false

true

Equivalent to "style" - HTML Optional Attribute

dir

false

true

HTML Standard Attribute

enctype

false

true

HTML Optional Attribute

htmlEscape

false

true

Enable/disable HTML escaping of rendered values.

id

false

true

HTML Standard Attribute

lang

false

true

HTML Standard Attribute

method

false

true

HTML Optional Attribute

modelAttribute

false

true

Name of the model attribute under which the form object is exposed. Defaults to 'command'.

name

false

true

HTML Standard Attribute - added for backwards compatibility cases

onclick

false

true

HTML Event Attribute

ondblclick

false

true

HTML Event Attribute

onkeydown

false

true

HTML Event Attribute

onkeypress

false

true

HTML Event Attribute

onkeyup

false

true

HTML Event Attribute

onmousedown

false

true

HTML Event Attribute

onmousemove

false

true

HTML Event Attribute

onmouseout

false

true

HTML Event Attribute

onmouseover

false

true

HTML Event Attribute

onmouseup

false

true

HTML Event Attribute

onreset

false

true

HTML Event Attribute

onsubmit

false

true

HTML Event Attribute

title

false

true

HTML Standard Attribute