radio:
选择类型:
出差
脱产学习
事假
病假
年休假
婚假
input:
岗位:工作时间:
年
在JavaScript中通过radio的选择来控制input的显示与隐藏
//类型选择后出现请假类型
function display(n) {
if(n==01||n==03){
$("#isshow").find("th:eq(1)").show();
$("#isshow").find("td:eq(1)").show();
$("#isshow").find("td:eq(0)").attr("colspan","1");
}else if(n==06){
$("#isshow").find("td:eq(0)").attr("colspan","3");
$("#isshow").find("th:eq(1)").hide();
$("#isshow").find("td:eq(1)").hide();
}else{
$("#isshow").find("td:eq(0)").attr("colspan","3");
$("#isshow").find("th:eq(1)").hide();
$("#isshow").find("td:eq(1)").hide();
}
}
页面初始化时input的显示与隐藏
showtable.loader('TextInput01', 'tr', 'evenOver');
$("#isshow").find("th:eq(1)").show();
$("#isshow").find("td:eq(1)").show();