Spring 表单 文本框 readonly的设置
来源:互联网 发布:mac的pages怎么转word 编辑:程序博客网 时间:2024/05/16 05:02
刚开始用spring表单,想把文本框设置为只读,用readonly="readonly" 设置了半天,还是可以编辑该文本框。
在网上搜索了很久都没有解决方法,最后到spring的网站,看了他们的说明文档才知道,spring表单的input是不支持readonly="readonly"的。
只支持readonly="true" 或者readonly="false" ,这样才可以设置文本框的只读属性。
以下是input标签的一些说明:
E.7. The input tag
Renders an HTML 'input' tag with type 'text' using the bound value.
Table E.6. Attributes
accesskey
false
true
HTML Standard Attribute
alt
false
true
HTML Optional Attribute
autocomplete
false
true
Common Optional Attribute
cssClass
false
true
Equivalent to "class" - HTML Optional Attribute
cssErrorClass
false
true
Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.
cssStyle
false
true
Equivalent to "style" - HTML Optional Attribute
dir
false
true
HTML Standard Attribute
disabled
false
true
HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.
htmlEscape
false
true
Enable/disable HTML escaping of rendered values.
id
false
true
HTML Standard Attribute
lang
false
true
HTML Standard Attribute
maxlength
false
true
HTML Optional Attribute
onblur
false
true
HTML Event Attribute
onchange
false
true
HTML Event Attribute
onclick
false
true
HTML Event Attribute
ondblclick
false
true
HTML Event Attribute
onfocus
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
onselect
false
true
HTML Event Attribute
path
true
true
Path to property for data binding
readonly
false
true
HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.
size
false
true
HTML Optional Attribute
tabindex
false
true
HTML Standard Attribute
title
false
true
HTML Standard Attribute
网址为:
http://static.springsource.org/spring/docs/2.0.x/reference/spring-form.tld.html#spring-form.tld.input
- Spring 表单 文本框 readonly的设置
- JQuery 设置 表单元素的 readonly 和 disabled 属性
- Django Form设置文本框为readonly
- 表单文本框不可编辑,disabled与readonly区别
- 对设置成ReadOnly的文本框,JS无法改变其值
- 关于文本框的readonly及禁用
- 设置HTML表单文本框为只读的几种方式
- js对表单设置了readonly和disabled后的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- 表单中Readonly和Disabled的区别
- Ext让grid支持按列排序--中文排序问题
- vs2010 删除工具栏上图标
- 合并两个有序序列
- redhat下安装中文输入法
- 将递归转化成迭代的通用技术
- Spring 表单 文本框 readonly的设置
- TCP UDP Socket流程
- 软件进行局域网备份SQL数据库的方法!
- smarty嵌套循环
- 正则表达式元字符列表
- zoj 1406 Jungle Roads
- 一个变态C/C++面试题的变态解法
- 软件测试用例的基本要素
- js弹出提示框