Web page Save as two JS code
In fact, a lot of time we need to save the content of the Web page directly as, below we provide two JS save as a Web page code.
<html>
<head>
<title> Save pages </title>
</head>
<body>
<object classid= "CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"
height= "0" width= "0" id=webbrowser></object>
<input type= "button" value= "Save Web Page" onclick= "WEBBROWSER.EXECWB (4,1)" >
</body>
</html>
Method Two
<input Type=button value= Save As Onclick=document.execcommand (' SaveAs ', false, ' c:test.htm ') >
Method Three
<input Name=button ONCLICK=DOCUMENT.ALL.WEBBROWSER.EXECWB (4,1) Type=button value= Save as ><object classid= CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=webbrowser width=0></object>
See a Save as an instance
Save as a specified file or page
function savehtm (p_filename)
{
var winname = window.open ('. /upload/' +p_filename, ' _blank ', ' top=10000 ';
Winname.document.execcommand (' SaveAs ', ', ', p_filename);
Winname.close ();
}
//Save as current page
<input Type=button value= Save as HTM onclick= "Document.execcommand (' SaveAs ', ' true ', ' xrx.htm ')" >
<p align= "center" >
<input Type=button value= Save as txt onclick= "Document.execcommand (' SaveAs ', ' true ', ' xrx.txt ')" ></p>