HTML-看到更多注释打破所有表格
我创建一个页面。用户可以看到评论。 当他们点击“devam”url时。他们看到的更多与评论相关HTML-看到更多注释打破所有表格,html,Html,我创建一个页面。用户可以看到评论。 当他们点击“devam”url时。他们看到的更多与评论相关 但是这打破了桌子。我想要的是,它只改变相关的注释宽度和高度。我该怎么做?问题是它正在扩展单元格,并导致其他单元格的文本也被环绕……在前两个单元格上使用此样式: <td style="white-space: nowrap;">...</td> 。。。 或者,显式为其设置宽度,即: <td style="width:200px">...</td>
但是这打破了桌子。我想要的是,它只改变相关的注释宽度和高度。我该怎么做?问题是它正在扩展单元格,并导致其他单元格的文本也被环绕……在前两个单元格上使用此样式:
<td style="white-space: nowrap;">...</td>
。。。
或者,显式为其设置宽度,即:
<td style="width:200px">...</td>
。。。
也许这就是您要搜索的内容
.date\u col、.movie\u col、.descr\u col{
高度:50px;
}
.date_col{宽度:66px}
.movie_col{宽度:100px}
.descr_col{宽度:300px}
.完整描述{
宽度:300px;
高度:150像素;
}
$(文档).ready(函数(){
初始化链接();
});
函数init_links(){
$(“.descr\u col>a.fulltext”).unbind()。单击(函数(){
$(这是)。父母(“td”).attr(“类”、“完整描述”);
初始化链接();
});
$(“.full\u descr\u col>a.fulltext”).unbind()。单击(函数(){
$(这是)。父母(“td”).attr(“类”、“描述”);
初始化链接();
});
}
日期
电影
描述
日期
电影
描述
日期
电影
描述
日期
电影
描述
您的问题没有准确说明。如果你需要帮助,你需要给我们更多的细节你说的“打破桌子”是什么意思?
<style>
.date_col,.movie_col,.descr_col {
height:50px;
}
.date_col{width:66px}
.movie_col{width:100px}
.descr_col{width:300px}
.full_descr_col{
width:300px;
height:150px;
}
</style>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$(document).ready(function () {
init_links();
});
function init_links() {
$(".descr_col>a.fulltext").unbind().click(function() {
$(this).parents("td").attr("class","full_descr_col");
init_links();
});
$(".full_descr_col>a.fulltext").unbind().click(function() {
$(this).parents("td").attr("class","descr_col");
init_links();
});
}
</script>
<table border=1>
<tr>
<td class="date_col">date</td>
<td class="movie_col">movie</td>
<td class="descr_col">description</td>
</tr>
<tr>
<td class="date_col">date</td>
<td class="movie_col">movie</td>
<td class="descr_col">
description
<a href="#examplelink" class="fulltext">examplelink</a>
</td>
</tr>
<tr>
<td class="date_col">date</td>
<td class="movie_col">movie</td>
<td class="descr_col">description</td>
</tr>
<tr>
<td class="date_col">date</td>
<td class="movie_col">movie</td>
<td class="descr_col">description</td>
</tr>
</table>