0
下面的代码正在使用谷歌浏览器和Firefox,但不是在Internet Explorer 11上。我有一个图像,我为它创建了一个映射。我尝试了不同的方式来提交表单并调用javascript函数。我注意到,映射只适用于我有一个按钮,但表单提交不起作用。当使用按钮类型=“提交”时,它仍然不提交,但调用了JavaScript函数。Internet Explorer提交表单无效
我想要一个图像的映射,表单将被提交,并且javascript函数将被调用。
<div>
<img src="keys.jpg;" height="480" width="640" border="1" usemap="#keysmapping">
<map name="keysmapping">
<form method=GET>
<input type="submit" name="key" value="2" onclick="setTimeout('updateImage();',100);"><area class="one" shape="rect" coords="0,0,90,85"></input>
</form>
<form method=GET>
<button type="submit" name="key" value="3" onclick="setTimeout('updateImage();',100);"><area class="two" shape="rect" coords="95,0,195,85"></button>
</form>
<form method=GET>
<input type="text" name="key" value="4">
<button onclick="setTimeout('updateImage();',100);"><area class="three" shape="rect" coords="195,0,290,85"></button>
</form>
</map>
</div>
什么的'updateImage()'函数? – TheDarkKnight
这是我的javascript功能。 <脚本类型= “文本/ JavaScript的”> \t \t 功能updateImage(){ \t IMG =的document.getElementById( 'screenImage'); \t img.src ='screen.jpg?' +的Math.random();” \t} \t – rleenaerts
你确定你已经在'互联网Explorer'设置中启用脚本 – TheDarkKnight