Form Tags - WebWork2文檔中文化計(jì)劃
Struts2.0標(biāo)簽庫(三)表單標(biāo)簽
及 Struts 2深入詳解 by.孫鑫
描述
對(duì)于表單標(biāo)簽,分為兩種標(biāo)簽:form標(biāo)簽本身,和所有來包裝單個(gè)的表單元素的其他標(biāo)簽.form標(biāo)簽本身的行為不同于它內(nèi)部的元素,這是很重要的.在我們?yōu)樗斜韱螛?biāo)簽,包括form標(biāo)簽在內(nèi),提供一個(gè)參考手冊(cè)之前,我們必須先描述一些通用的屬性.
通用屬性
屬性 | Theme | 數(shù)據(jù)類型 | 描述 |
cssClass | simple | String | 定義 html class 屬性 |
cssStyle | simple | String | 定義html style 屬性 |
title | simple | String | 定義html title 屬性 |
disabled | simple | String | 定義html disabled 屬性 |
label | xhtml | String | 定義表單元素的label |
labelPosition | xhtml | String | 定義表單元素的label位置(top/left),缺省為left |
requiredposition | xhtml | String | 定義required 標(biāo)識(shí)相對(duì)label元素的位置 (left/right),缺省是 right |
name | simple | String | 表單元素的name映射 |
required | xhtml | Boolean | 在label中添加 * (true增加,否則不增加) |
tabIndex | simple | String | 定義html tabindex 屬性 |
value | simple | Object | 定義表單元素的value |
Javascript相關(guān)屬性
屬性 | Theme | 數(shù)據(jù)類型 | 描述 |
onclick | simple | String | html javascript onclick 屬性 |
ondbclick | simple | String | html javascript ondbclick 屬性 |
onmousedown | simple | String | html javascript onmousedown 屬性 |
onmouseup | simple | String | html javascript onmouseup 屬性 |
onmouseover | simple | String | html javascript onmouseover 屬性 |
onmouseout | simple | String | html javascript onmouseout 屬性 |
onfocus | simple | String | html javascript onfocus 屬性 |
onblur | simple | String | html javascript onblur 屬性 |
onkeypress | simple | String | html javascript onkeypress 屬性 |
onkeyup | simple | String | html javascript onkeyup 屬性 |
onkeydown | simple | String | html javascript onkeydown 屬性 |
onselect | simple | String | html javascript onselect 屬性 |
onchange | simple | String | html javascript onchange 屬性 |