“設爲桌面圖標”效果,可將網頁以快捷方式的形式設置在用戶的桌面上。
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,上傳到網站,然後在需要提示用戶保存爲桌面圖標的位置插入此網頁的鏈接即可。