form表单元素设置只读
生活随笔
收集整理的這篇文章主要介紹了
form表单元素设置只读
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
form表單元素設(shè)置只讀
CreateTime--2017年5月5日11:42:41
Author:Marydon
1.設(shè)置文本框只讀
<!-- 方法一:簡(jiǎn)寫 --> <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="">選項(xiàng)一</option><option value="">選項(xiàng)二</option><option value="">選項(xiàng)三</option> </select>小結(jié):
1.標(biāo)簽屬性:只讀readonly、禁用disabled、單選框&復(fù)選框默認(rèn)選中checked、下拉列表框默認(rèn)選中selected都可以簡(jiǎn)寫;
2.設(shè)置disabled屬性后,該元素的數(shù)據(jù)將無(wú)法提交,可以添加一個(gè)隱藏域
<input id="" name="" type="hidden" value="" />。
?
?相關(guān)推薦:
- 類似文章
?
總結(jié)
以上是生活随笔為你收集整理的form表单元素设置只读的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 不礼让行人怎么抓拍的_【交通违法曝光20
- 下一篇: 启动页面和各设备的宽高比及像素