當前位置:
首頁 >
form表单元素设置只读
發(fā)布時間:2023/12/19
43
豆豆
生活随笔
收集整理的這篇文章主要介紹了
form表单元素设置只读
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
form表單元素設(shè)置只讀
CreateTime--2017年5月5日11:42:41
Author:Marydon
1.設(shè)置文本框只讀
<!-- 方法一:簡寫 --> <input type="text" name="" value="文本框" class="" readonly/> <!-- 方法二:寫全 --> <input type="text" name="" value="文本框" class="" readonly="readonly"/>2.設(shè)置單選框只讀(禁用)
<td class="tdbiejing" nowrap="nowrap">允許調(diào)劑</td> <td nowrap="nowrap"><label class="radioCss"><input name="isAdjust" id="" type="radio" value="" disabled<c:if test="${model.coumn==0 }">checked</c:if>/>是</label> <label class="radioCss"><input name="isAdjust" id="" type="radio" value="" disabled<c:if test="${model==1 }">checked</c:if>/>否</label> </td>3.禁用下拉列表框
<select id="" name="" nowrap="nowrap" class="TextBox" disabled><option value="">選項一</option><option value="">選項二</option><option value="">選項三</option> </select>小結(jié):
1.標簽屬性:只讀readonly、禁用disabled、單選框&復選框默認選中checked、下拉列表框默認選中selected都可以簡寫;
2.設(shè)置disabled屬性后,該元素的數(shù)據(jù)將無法提交,可以添加一個隱藏域
<input id="" name="" type="hidden" value="" />。
?
?相關(guān)推薦:
- 類似文章
?
總結(jié)
以上是生活随笔為你收集整理的form表单元素设置只读的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 不礼让行人怎么抓拍的_【交通违法曝光20
- 下一篇: 启动页面和各设备的宽高比及像素