开发者

IE8 Browser JavaScript issue

Can anyone tell me the reason why the following works in IE8 but not in Safari 5.1?

<a onclick="j开发者_如何学运维avascript:submit();"><img src="Images/Next.png" width="20" height="20"></a>

JavaScript is enabled in both IE8 and Safari 5.1.


Try dropping the 'javascript:' from the onclick. The only time I see this syntax used is when it is in the href. The content of onclick is assumed to be JavaScript by default. As such,

javascript:submit();

Is not valid JavaScript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜