jquery控制table中的input样式,巧妙利用标签元素,隐藏input边框
来源:互联网 发布:nokia5250软件下载 编辑:程序博客网 时间:2024/05/23 13:26
直接进入主题:jsp页面源代码
<style>
.ge_table{ width:100%;}
.ge_table td{ height:44px; line-height:26px;}
.hide_border{border: 0px;padding-left: 5px;line-height: 26px;width:205px;height: 26px;}
.ge_input{border:1px solid #ccc;padding-left:5px;line-height:26px;width:205px; height:26px;}
</style>
<table cellpadding="0" cellspacing="0" border="0" class="ge_table">
<tr><td>收货地址:</td>
<td><select id="province" onchange="selCity()" class="cursor"><option
value="0" selected="selected">请选择</option>
<c:forEach items="${province}" var="province">
<option value="${province.zoneCode}">${province.zoneName}</option>
</c:forEach>
</select> <select id="city" onchange="selArea()" class="cursor">
<option value="0">请选择</option>
</select> <select id="area" onchange="selectArea()" class="cursor">
<option value="0">请选择</option>
</select>
</td>
</tr>
<tr>
<td>收货人姓名:</td>
<td >
<input type="text" class="ge_input" id="inputConsignee" onblur="checkConsignee()" />
<p id="consigneeMsg"></p>
</td>
</tr>
<tr>
<td class="td"><input type="button" class="button2"
id="sure" onclick="makeSure()" value="确认" /> <input
type="button" class="button2" id="cancle" value="修改"
onclick="updateMsg()" /></td>
</tr>
</table>
点击确定按钮调用方法:
function makeSure() {
$("#province").attr("disabled", true);
$("#city").attr("disabled", true);
$("#area").attr("disabled", true);
$("input.ge_input").each(function(){
$(this).removeClass().addClass("hide_border").attr("readonly",true);
});
}
}
点击修改按钮调用方法:
function updateMsg(){
$("input.hide_border").each(function(){
$(this).removeClass().addClass("ge_input").attr("readonly",false);
});
}
点击确定按钮之前页面效果:
点击确定按钮之后效果:
点击修改按钮之后,页面效果返回如图一。
- jquery控制table中的input样式,巧妙利用标签元素,隐藏input边框
- A标签实现文件下载以及INPUT隐藏边框样式
- ie6 ie7中input标签隐藏边框
- 如何隐藏input标签的样式
- input边框隐藏
- CSS分类控制input标签样式
- INPUT标签无边框
- JQuery控制input的隐藏和显示
- input标签的隐藏
- js隐藏input text 边框
- input标签无边框效果
- jquery操作input标签
- jquery 控制 input disabled
- 隐藏input标签外边框
- html5中的input元素
- struts2中的input标签
- 如何控制input的样式
- input值控制按钮样式
- 重叠的 CCMenu touch 优先级问题
- 云计算服务提供商的服务模式分类小结
- Android的NDK开发
- 黑马程序员 学习笔记五:JDK5之可变参数,代替某些重载的情况
- webservice配置和发布,axis2配置
- jquery控制table中的input样式,巧妙利用标签元素,隐藏input边框
- 【动态规划】——POJ 1018 Communication System
- Qt5 在win7上发布 & 打包依赖dll生成exe方法
- vim的替换功能与技巧
- PHP: Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted
- Linux驱动开发之三----按键驱动(Tiny6410)
- 《Effective C++》学习笔记条款10 令operator= 返回一个reference to *this
- html页面图形绘制
- POJ - 1390 Blocks