The following code is mainly used on some image websites. You only need to click the link to display the Save image dialog box. Both formats are supported.
First:
Script function SaveAs5 (imgURL) {var oPop = window. open (imgURL, "", "width = 1, height = 1, top = 5000, left = 5000"); for (; oPop.doc ument. readyState! = "Complete";) {if (oPop.doc ument. readyState = "complete") break;} oPop.document.exe cCommand ("SaveAs"); oPop. close ();} script
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Second:
Script function SaveAs5 (imgURL) {var oPop = window. open (imgURL, "", "width = 1, height = 1, top = 5000, left = 5000"); for (; oPop.doc ument. readyState! = "Complete";) {if (oPop.doc ument. readyState = "complete") break;} oPop.document.exe cCommand ("SaveAs"); oPop. close ();} click here to download the image from script
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]