English
Web page special effects code example, using Javascript to create desktop shortcuts.
<script language="JavaScript"> function toDesktop(sUrl,sName){ try { var WshShell = new ActiveXObject("WScript.Shell"); var oUrlLink = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") + "\ " + sName + ".url"); oUrlLink.TargetPath = sUrl; oUrlLink.Save(); } catch(e) { alert("The operation is not allowed at the current IE security level!"); } } </script> <input name="btn" type="button" id="btn" value="Website Building Academy" onClick="toDesktop('http://www.downcodes.com/','Website Building Academy')"> <input name ="btn" type="button" id="btn" value="C drive" onClick="toDesktop('file://C:','C drive')">