网站开发与移动开发

博客园 首页 新随笔 管理

在Flash中实现“设为首页”和“加为收藏”功能是使用Get URL结合JavaScript来实现的。


设为首页代码:

on (release) {
getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');void document.links[0].setHomePage('http://www.zishu.cn/');", "_self", "POST");
}


  加为收藏代码:

on (release) {
getURL("javascript:window.external.AddFavorite('http://www.zishu.cn/','子鼠')");
}


在<body>和</body>之间,加入以下代码:
<A HREF=Javascript:></A>

posted on 2009-03-04 18:32  txf2004  阅读(135)  评论(0编辑  收藏  举报