“设为桌面图标”的ASP源代码

来源:互联网 发布:南京大学软件学院考研 编辑:程序博客网 时间:2024/04/30 22:16

“设为桌面图标”效果,可将网页以快捷方式的形式设置在用户的桌面上。

  ASP代码:
<%
Response.ContentType="APPLICATION/OCTET-STREAM"
Response.AddHeader "Content-Disposition","attachment;filename="&"易迈软件.url"
Response.Write("[InternetShortcut]")&Chr(13)
Response.Write("URL=http://www.ehpos.com")&Chr(13)
Response.Write("IDList=")&Chr(13)
Response.Write("[{000214A0-0000-0000-C000-000000000046}]")&Chr(13)
Response.Write("Prop3=19,2")&Chr(13)
Response.End
%>


  修改上面代码中的网站名称和网址后,把代码保存为shortcut.asp,上传到网站,然后在需要提示用户保存为桌面图标的位置插入此网页的链接即可。