我还是一个新手,正在尝试将图像添加到项目的描述中。理论上,当用户将鼠标悬停在项目上时,旁边的列中会显示图像和描述。我知道我在使用双引号和单引号时做错了什么,但我不确定它是什么。
function gettip(txt)
{
document.getElementById('info').innerHTML=txt;
}
function reset()
{
document.getElementById('info').innerHTML="Roll over a link for information on the project! "
}
<a href="Homework.html"
onmouseover="gettip('<img src='Images/homeworkpreview.jpg'><br><br><b>Due:</b> January 27 <br> <b>Points:</b> 50 <br> <br> <b> Description: </b> <br> Create a Homework page with a table with information about the projects for this semester. This will act as the hub for all of your projects to be linked to.')"
onmouseout="reset()"> Homework </a>
翻翻过去那场雪
米脂
相关分类