<img src="../www.gif" onclick="mm(this)"><SCRIPT LANGUAGE="JavaScript">
function mm(e) //这个方法只针对图片
{
var w = window.open(e.src, "_blank", "width=100,height=100");
w.document.execCommand('Saveas');
w.close()
}
</SCRIPT>
function mm(e) //这个方法只针对图片
{
var w = window.open(e.src, "_blank", "width=100,height=100");
w.document.execCommand('Saveas');
w.close()
}
</SCRIPT>
<!--
function download(){
var win=window.open("**.txt");
win.document.execCommand("saveas");
win.close();
}
//-->
</script>
win.document.exeCommand("saveas");
win.close();
任何文件都可以的。改改**.txt就行了,**.txt只是代表文件,举个例子而已,可以换成别的文件的。明白了吗?