首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

struct传值为空的有关问题

2012-03-18 
struct传值为空的问题我在action中自动生成有一个编号request.getSession().setAttribute(customerID, c

struct传值为空的问题
我在action中自动生成有一个编号
request.getSession().setAttribute("customerID", customerID);,
传到页面后<input type="text" name="customerID" value="${customerID}"
disabled="disabled" />
页面再提交到action后,我就获得 customerID的值为null,这是怎么回事?

[解决办法]
disabled="disabled" 换成readonly.
[解决办法]
disabled="disabled"这一句去掉就可以了
[解决办法]
使用disabled属性后的区域的值,不能被传递给其他的程序去处理,如果你非要传递请通过隐藏属性去做。即 

<input type="hidden" name="customerID" value="${customerID}" >

热点排行