ie下点击图片会出现另存为的画面,但是firefox却没有。
怎么办啊?我大概知道firefox不支持execCommand。
但是有什么办法能让两个浏览器表现一样了。
高手帮帮忙阿!<img src="images/canada.jpg" onclick="document.execCommand('saveAs','images/canada.jpg');">
怎么办啊?我大概知道firefox不支持execCommand。
但是有什么办法能让两个浏览器表现一样了。
高手帮帮忙阿!<img src="images/canada.jpg" onclick="document.execCommand('saveAs','images/canada.jpg');">
还是改为服务端下载吧:
<%
dim filename
filename = now()
filename = "某某文件"&filename&".txt"
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Content-Disposition", "attachment; filename="&filename
Response.contentType="application/vnd.ms-notepad"
'文件内容
%>
你用这个就可以支持FF了
document.getElementById(<IFRAME>).contentWindow.document.execCommand("Bold", false, null);
IE6能识别*,但不能识别 !important;
IE7能识别*,也能识别 !important;
FF不能识别*,但能识别 !important;
例如style="*width:10px;!important width:20px;"
这样在IE6下宽度为10px,在IE7下宽度时20px