1. 程式人生 > >jsp中input 隱藏的方法

jsp中input 隱藏的方法

經過查詢、Jsp中隱藏Input有2種、不知道還有沒有其他的、我暫時發現這2個、

1.<input type="hidden" name="friendname"  value="123"/>  新增type="hidden"就可以了,這樣它的value的值還是可以傳送到action,

2,<input type="text" name="friendname" value=“123” style="display:none"/>新增style="display:none" ,注意,type型別改變了。但這樣input的值就不可以傳到action了。 

對了,我是通過form表單傳遞的。