2010/06/18

location.href对Chrome无效

<input type="button" onclick="javascript:location.href('index.htm')" value="退回">

上面的代码仅在IE中有效,要想同时在Chrome(或Firefox)中有效,需改为:

<input type="button" onclick="javascript:location.href='index.htm'" value="退回">

没有评论: