HI請幫助解決這個問題的代碼,我使用<a href="http://example.com/index.html" onMouseOver="doTooltip(event,'http://example.com/image_6.06.jpg','Image TITLE')" onMouseOut="hideTip()" title="in TITLE">TITLE</a>
鼠標懸停doTooltip在phpmysql
在此代碼,但它不是工作
<?
$sql = "select * from wallpaper order by wallpaperid desc limit 20";
$result = mysql_query($sql, $db) or die(mysql_error());
if(mysql_num_rows($result)) {
while($myrow = mysql_fetch_array($result)) {
$title = substr($myrow['title'] ,0,31);
$wurl = ereg_replace(" ", "-", $myrow['title']);
$html = '<dt><a href="%s-%s.html" onMouseOver="doTooltip(event,\'.$siteurl/wallpapers/thumbs/$wallpapername_$wallpaperid.jpg.\',"Image TITLE")" onMouseOut="hideTip()">%s..</a></dt>';
printf($html, $wurl, $myrow["wallpaperid"], $myrow["wallpapername"], $myrow["title"], $category);
} }
?>
plsease有人能幫我解決這個 第二個代碼不工作onmouseOver提示
@Hassan:請注意,'$ siterl','$ wallpapername'和'$ wallpaperid'必須首先定義(它們不在您的代碼中)。 – 2010-01-20 17:12:10