新闻资讯
记录首创点滴进步 见证远行
我们一直紧跟时代前沿,聚焦行业实时动态,发布公司最新资讯,欢迎您的关注
您目前的位置:网站首页 > 新闻资讯 > 网站常识 >

在FLASH设为首页行之有效的代码

发布日期:2013-05-02文章来源:首创网络浏览次数:644次
    在FLASH设为首页行之有效的代码。 设为首页: getURL(\javascript:document.all.link[0].style.behavior=\url(#default#homepage)\;document.all.link[0].setHomePage(\http://您的网址\);\);//设为首页 //设为首页 on(release){ getURL(javascript:void(document.links[0].style.b......
    本文关键字:在,FLASH,设为,首页,行之有效,的,代码,在,FLASH,
  在FLASH设为首页行之有效的代码。
  设为首页:
  getURL(\"javascript:document.all.link[0].style.behavior=\'url(#default#homepage)\';document.all.link[0].setHomePage(\'http://您的网址\');\");//设为首页
  //设为首页
  on(release){
  getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');voiddocument.links[0].setHomePage('http://www.hdscwl.com/');","_self","POST";
  }
  on(release){
  getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');voiddocument.links[0].setHomePage('http://16sucai.com');");
  }
  
  在body和body之间,加入以下代码:
  
  一定要加!
  on(release){getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');voiddocument.links[0].setHomePage(你的网址');","_self");}“加入收藏”on(release){getURL("javascript:window.external.AddFavorite('你的网址','站名')");}一,用getURL的方法:首页:on(release){getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');voiddocument.links[0].setHomePage('http://www.hdscwl.com/');","_self","POST");}收藏夹:on(release){getURL("javascript:voidwindow.external.AddFavorite('http://www.hdscwl.com','首创网络');","_self","POST");}二,用fscommand的方法,有点复杂1,先在flash的按钮上添加代码:首页:on(release){fscommand("setHomePage","http://www.hdscwl.com");}收藏夹:on(release){fscommand("addFavorite","http://www.hdscwl.com|首创网络");}然后在发布设置中选择flashwithfscommand,发布成html2,修改html:找到//HandleallthetheFSCommandmessagesinaFlashmoviefunctionsethomepage_DoFSCommand(command,args){}这一段,修改成://HandleallthetheFSCommandmessagesinaFlashmoviefunctionsethomepage_DoFSCommand(command,args){varsethomepageObj=InternetExplorer?sethomepage:document.sethomepage;if(command=="setHomePage"){document.links[0].style.behavior="url(#default#homepage)";document.links[0].setHomePage(args);}elseif(command=="addFavorite"){args=args.split("|");window.external.AddFavorite(args[0],args[1]);}}最后,如果html里一个链接都没有,还需在<SCRIPTLANGUAGE=JavaScript>这句的前面添加一句<ahref="javascript:"></a>
  
  on(release)
  {
  getURL("javascript:void(document.links.style.behavior='url(#default#homepage)');voiddocument.links.setHomePage('http://www.hdscwl.com')","_self","POST");
  }
    本文由邯郸网络公司首创网络整理编辑发布,请勿转载、复制、摘抄等!

+ 查看更多我们的客户 / Our client

0310-4559740
400-990-1661
    24小时报务热线
    18931045623
在线客服
首创网络邯郸公司
邯郸公司
电话:0310-4559740 / 18931045623  地址:邯郸市丛台区颐高广场B座13层1304室