首页 新闻 会员 周边

table表格td列不能跨列

0
悬赏园豆:10 [待解决问题]

前端jsp页面代码:

<table width="80%" border="1" align="center" class="gridtable"
id="idData" >
<thead>
<tr>
<td colspan="8" align="center">学生信息管理</td>
</tr>
</thead>
<tbody>
<tr align="center">
<th><input type="checkbox" id="all" name="all" /></th>
<th>学号</th>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>学科</th>
<th>手机号</th>
<th>操作</th>
</tr>
<c:forEach items="${list}" var="Mod" varStatus="status">
<div style="display: none;"><c:out value="${status.count}"/></div>
<tr style="display: none;" id="show_div${status.count}" >
<td id="colspan" colspan='8'>
<form action="ups">
学号:${Mod.sid}<input style="display: none;" type="text" name="sid" value="${Mod.sid}">
<input placeholder="姓名:" type="text" name="studentname" value="${Mod.studentname}">
<input placeholder="性别:" type="text" name="gender" value="${Mod.age}">
<input placeholder="年龄:" type="text" name="age" value="${Mod.gender}">
<input placeholder="专业:" type="text" name="specialty" value="${Mod.specialty}">
<input placeholder="手机号:" type="text" name="phone" value="${Mod.phone}">
<input type="submit" value="更新">
<input type="button" onclick="aa${status.count}()" value="取消">
</form>
</td>
</tr>
<tr>
<td><input type="checkbox" id="subcheck" name="subcheck" value="${Mod.sid}" /></td>
<td>${Mod.sid}</td>
<td>${Mod.studentname}</td>
<td>${Mod.age}</td>
<td>${Mod.gender}</td>
<td>${Mod.specialty}</td>
<td >${Mod.phone}</td>
<td>
<input type="button" onclick="firm(${Mod.sid})" value="删除" />
<input id="a" type="button" onclick="op${status.count}()" value="修改"/>
<input type="button" onclick="firm1(${Mod.sid})" value="详情" />
</td>
</tr>
<SCRIPT type="text/javascript" lang=javascript>
function op${status.count}(){
if($(".a").is(":hidden")){
$(".a").show();//如果元素为隐藏,则将它显现
var change_cancel = document.getElementById("show_div${status.count}");
change_cancel.style.display = "none";
}else{
$(".a").hide();//如果元素为显现,则将其隐藏
var change_cancel = document.getElementById("show_div${status.count}");
change_cancel.style.display = "block";
}
}
function aa${status.count}(){
if($(".a").is(":hidden")){
$(".a").show();//如果元素为隐藏,则将它显现
var change_cancel = document.getElementById("show_div${status.count}");
change_cancel.style.display = "none";
}else{
$(".a").hide();//如果元素为显现,则将其隐藏
var change_cancel = document.getElementById("show_div${status.count}");
change_cancel.style.display = "block";
}
}
</SCRIPT>
</c:forEach>

</table>

9257001的主页 9257001 | 初学一级 | 园豆:103
提问于:2019-02-12 18:40
< >
分享
所有回答(2)
0

跨列是rowspan
colspan是跨欄

RosonJ | 园豆:4910 (老鸟四级) | 2019-02-13 14:33

n是真的会吗?

支持(0) 反对(0) 9257001 | 园豆:103 (初学一级) | 2019-02-14 14:31

@9257001:
抱歉抱歉,原來兩地用語不同

支持(0) 反对(0) RosonJ | 园豆:4910 (老鸟四级) | 2019-02-14 17:19

@9257001:
我看你的跨列沒問題啊,能說說你的問題在哪嗎

支持(0) 反对(0) RosonJ | 园豆:4910 (老鸟四级) | 2019-02-14 17:46

@RosonJ: 就是不能跨列,其他的都正常

支持(0) 反对(0) 9257001 | 园豆:103 (初学一级) | 2019-02-15 17:10
0

colspan="8"

9257001 | 园豆:103 (初学一级) | 2019-02-25 14:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册