1
由於某種原因,我無法使此代碼正常工作 當我將鼠標移過<時,我想讓#remove_ $ id顯示然後隱藏當鼠標移離Php jquery鼠標過度幫助
jQuery代碼:
$(function() {
var id = this.id;
$("tr").hover(function() {
$("#remove_" + id).show();
}, function() {
$("#remove_" + id).hide();
});
});
PHP代碼:
$result = mysql_query("SELECT * FROM wall WHERE uid='$myid' ORDER BY id DESC") or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$uid = $row['uid'];
$fid = $row['fid'];
$action = $row['action'];
echo "< table width='467' border='0' align='left' cellpadding='0' cellspacing='0'>
< tr id='wall_$id'>
< td width='18' height='25'> < /td>
< td width='396' valign='top' class='txt'>RickStar has upload new photos. - < span class='comment'>
< a href='#'>Comment< /a>< /span>< br />< /td>
< td width='53' valign='top'>< span class='txt'>
< div id='remove_$id' class='mydiv'>Remove< /div>
< /span>< /td>
< /tr>
< /table>";
}
? ...... TR支持:懸停在JS中的css和mouseover/mouseout中。 – 2009-06-12 23:44:18