dtlhy0771 2013-10-05 04:10
浏览 50
已采纳

PHP onmouseover更改从数据库调用的图像

  echo'<img src="'.$row['filename'].'" onmouseover="this.src='.$row['back_filename'].'" onmouseout="this.src='.$row['filename'].'" />';

I'm calling in 2 images from a database using mySql and php, How come this onmousover doesn't work? ps. I'm calling a path to the image not storing the image in the database itself.

  • 写回答

2条回答 默认 最新

  • duai8153 2013-10-05 04:13
    关注

    try this

    echo'<img src="'.$row['filename'].'" onmouseover="this.src=\''.$row['back_filename'].'\'" onmouseout="this.src=\''.$row['filename'].'\'" />';
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?