2種形式都可以
第一種:
<script> <BR>function SaveAs5(imgURL) <BR>{ <BR>var oPop = window.open(imgURL,"","width=1, height=1, top=5000, left=5000" ); <BR>for(; oPop.document.readyState != "complete"; ) <BR>{ <BR>if (oPop.document.readyState == "complete")break; <BR>} <BR>oPopyState == "complete")break; <BR>} <BR>oPopyState .document.execCommand("SaveAs"); <BR>oPop.close(); <BR>} <BR></script>
程式碼如下:
<script> <BR>function SaveAs5(imgURL) <BR>{ <BR>var oPop = window.open(imgURL,"","width=1, var oPop = window.open(imgURL,"","width=1, cight =1, top=5000, left=5000"); <BR>for(; oPop.document.readyState != "complete"; ) <BR>{ <BR>if (oPop.document.readyState == "complete" )break; <BR>} <BR>oPop.document.execCommand("SaveAs"); <BR>oPop.close(); <BR>} <BR></script>
點擊這裡下載圖片