为了方便起见,我目前正在尝试将来自另一个网站的实时视频流添加到我自己的网站上,但似乎无法使其正常工作。我已经使用选择和选项编写了一个下拉列表,选择 id="select camera" onchange="traffic()。有人可以告诉我下面的脚本做错了什么吗?
function traffic() <br>
{ <br>
location[0] = "<img src='http://131940.qld.gov.au/DMR.Controls/WebCams/DisplayImage.ashx?FilePath=\Metropolitan\mecure.jpg&R=1369294224610' alt='Brisbane City Traffic Camera is Currently Unavailable'width='500' height='400'>"; <br>
location[1] = "<img src='http://131940.qld.gov.au/DMR.Controls/WebCams/DisplayImage.ashx?FilePath=\Metropolitan\Rochedale_Pac_Mwy_Sth.jpg&R=1369294358098' alt='Rochedale Traffic Camera is Currently Unavailable'width='500' height='400'>"; <br>
location[2] = "<b>Select a Traffic Camera</b>" <br>
list=document.getElementById("select camera"); <br>
index=list.selectedIndex; <br>
document.getElementById("traffic").innerHTML=location[index]; <br>
}
提前谢谢你!