嗨我以这种方式获得了tr内容simil
var td = $("tr td"); // get first child of all the td elements
var htmlContent = []; // initilize an empty array
for (i = 0; i < td.length; i++) {
htmlContent[i] = $(td[i]).text();
trid[i] = $(td[i]).attr("id");
}
&#13;
我想要tr id所以我使用这段代码
trid[i] = $(td[i]).attr("id");
但这不好
答案 0 :(得分:1)
答案 1 :(得分:0)
您应该只使用.date
{
width:80px;
height:80px;
border:1px solid #000000;
text-align:center;
font-size:65px;
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
background:red;
color:#ffffff;
position:relative;
overflow:hidden;
}
.sideflip
{
width:50px;
height:50px;
font-size:1px;
position:absolute;
-ms-transform: rotate(-50deg);
-webkit-transform: rotate(-50deg);
transform: rotate(-50deg);
margin-left:160px;
margin-top:-130px;
background:#ffffff;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.date:hover .sideflip
{
margin-left:60px;
margin-top:-30px;
}
.date:hover
{
cursor:pointer;
}
,因为它已经是DOM对象。您不需要像td
..
然后只需指定索引$(td)
td[i]