私は問題があります
私は Javascript についてあまり詳しくなく、基本的なことしか知りません。私はこのコードを持っています。ただし、リストからオプションを選択するときは、iframe のアドレス「src」を変更しないでください。
何故ですか?
このコード Javascript
lstLinks = new Array(
"//e.issuu.com/embed.html#0/5202806",
"//e.issuu.com/embed.html#0/5203170",
"//e.issuu.com/embed.html#0/5203091",
"//e.issuu.com/embed.html#0/5203144"
);
function changeTest ()
{
var Index = document.menuForm.select1.options[document.menuForm.select1.selectedIndex].value;
document.testStar.src = lstLinks[Index];
}
このhtml
<form action="../action/return.html" method="post" id="menuForm" name="menuForm" enctype="application/x-www-form-urlencoded">
<select id="select1" onchange="changeTest()" name="select1">
<option value="0" selected="selected">Escoger</option>
<option value="1">Diapositiva 1</option>
<option value="2">Diapositiva 2</option>
<option value="3">Diapositiva 3</option>
</select>
</form>
<iframe id="testStar" name="testStar" width="170" height="205" src="//e.issuu.com/embed.html#0/5203197" frameborder="0" allowfullscreen></iframe>