“未捕获TypeError:无法设置空的'src‘属性”本质上,我尝试做的只是在JS中,允许用户将鼠标悬停在缩略图大小的图片上,并让它将主图片更改为相应的缩略图。moused over thumbnail's large bigPic = document.getElementById('#bigPic'
因此,在我的google chrome的上,我尝试使用setInterval函数让图像每5秒切换一次。这似乎是有效的,但我有问题,无法设置属性src的null。document.getElementById("img");
for (var i = 0; i < 3; i++) {
img.src= i - 2;}
单击时,我得到未捕获的TypeError不能设置属性'src‘的null。点击时没有任何反应,但video1在背景中启动,你看不到它,只有她的声音。任何帮助都是非常感谢的。YouTube autoplay var video = document.getElementById(video_id).src<
当被点击时,图像被放大,就好像它是到另一个网页的链接。我的代码与书中的代码完全相同,但我得到了一个错误。the image selected is the "href" and the caption is the title of each image link }}imageLinks[0].focus();这个错误