***测试搜索***超级酷搜索引擎
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta name="keywords" content="javascript,javascript,javascript,javascript,javascript">
<!-- 以下代码是设定此页的超链接样式 -->
<style type="text/css"><!-- a:link {text-decoration: none; color:#000000}
a:visited {text-decoration: none; color: #000000}
a:active {text-decoration: none; color: #ff0000}
a:hover {text-decoration: underline; color: ff0000}
body{font-size=9pt}
th{font-size: 9pt}
td{ font-size: 9pt}
#floater { position: absolute; left: 0; top: 0; width: 120; visibility: visible;
z-index: 10; background-color: #0099ff; border-style: solid;
border-color: #cc99ff
filter:alpha(opacity=0,finishopacity=100,style=0,startx=0,starty=0,finishx=130,finishy=30);}
-->
</style>
<title>"超级酷"搜索引擎</title>
</head>
<body>
<div id="floater" style="left: 0px; top: 0px; width: 132; height: 25">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="25">
<tr>
<td width="100%" align="center" height="12" bgcolor="#ccccff"><font color="#008080">"超级酷"搜索引擎</font></td>
</tr>
<tr>
<td width="100%" align="center" height="14"><form method=post action="http://search.yeah.net:88/cgi-bin/search.cgi" name="searchform">
<p align="center">
<input name="key" maxlength=800 size=13 value="">
<input type=submit class=p1 value=' 搜 索 '>
</form>
</td>
</tr>
</table>
</div><script language="javascript">
self.onerror=null;
currentx = currenty = 0;
whichit = null;
lastscrollx = 0; lastscrolly = 0;
ns = (document.layers) ? 1 : 0;
ie = (document.all) ? 1: 0;
<!-- stalker code -->
function heartbeat() {
if(ie) { diffy = document.body.scrolltop; diffx = document.body.scrollleft; }
if(ns) { diffy = self.pageyoffset; diffx = self.pagexoffset; }
if(diffy != lastscrolly) {
percent = .1 * (diffy - lastscrolly);
if(percent > 0) percent = math.ceil(percent);
else percent = math.floor(percent);
if(ie) document.all.floater.style.pixeltop += percent;
if(ns) document.floater.top += percent;
lastscrolly = lastscrolly + percent;
}
if(diffx != lastscrollx) {
percent = .1 * (diffx - lastscrollx);
if(percent > 0) percent = math.ceil(percent);
else percent = math.floor(percent);
if(ie) document.all.floater.style.pixelleft += percent;
if(ns) document.floater.left += percent;
lastscrollx = lastscrollx + percent;
}
}
<!-- /stalker code -->
<!-- drag drop code -->
function checkfocus(x,y) {
stalkerx = document.floater.pagex;
stalkery = document.floater.pagey;
stalkerwidth = document.floater.clip.width;
stalkerheight = document.floater.clip.height;
if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
else return false;
}
function grabit(e) {
if(ie) {
whichit = event.srcelement;
while (whichit.id.indexof("floater") == -1) {
whichit = whichit.parentelement;
if (whichit == null) { return true; }
}
whichit.style.pixelleft = whichit.offsetleft;
whichit.style.pixeltop = whichit.offsettop;
currentx = (event.clientx + document.body.scrollleft);
currenty = (event.clienty + document.body.scrolltop);
} else {
window.captureevents(event.mousemove);
if(checkfocus (e.pagex,e.pagey)) {
whichit = document.floater;
stalkertouchedx = e.pagex-document.floater.pagex;
stalkertouchedy = e.pagey-document.floater.pagey;
}
}
return true;
}
function moveit(e) {
if (whichit == null) { return false; }
if(ie) {
newx = (event.clientx + document.body.scrollleft);
newy = (event.clienty + document.body.scrolltop);
distancex = (newx - currentx); distancey = (newy - currenty);
currentx = newx; currenty = newy;
whichit.style.pixelleft += distancex;
whichit.style.pixeltop += distancey;
if(whichit.style.pixeltop < document.body.scrolltop) whichit.style.pixeltop = document.body.scrolltop;
if(whichit.style.pixelleft < document.body.scrollleft) whichit.style.pixelleft = document.body.scrollleft;
if(whichit.style.pixelleft > document.body.offsetwidth - document.body.scrollleft - whichit.style.pixelwidth - 20) whichit.style.pixelleft = document.body.offsetwidth - whichit.style.pixelwidth - 20;
if(whichit.style.pixeltop > document.body.offsetheight + document.body.scrolltop - whichit.style.pixelheight - 5) whichit.style.pixeltop = document.body.offsetheight + document.body.scrolltop - whichit.style.pixelheight - 5;
event.returnvalue = false;
} else {
whichit.moveto(e.pagex-stalkertouchedx,e.pagey-stalkertouchedy);
if(whichit.left < 0+self.pagexoffset) whichit.left = 0+self.pagexoffset;
if(whichit.top < 0+self.pageyoffset) whichit.top = 0+self.pageyoffset;
if( (whichit.left + whichit.clip.width) >= (window.innerwidth+self.pagexoffset-17)) whichit.left = ((window.innerwidth+self.pagexoffset)-whichit.clip.width)-17;
if( (whichit.top + whichit.clip.height) >= (window.innerheight+self.pageyoffset-17)) whichit.top = ((window.innerheight+self.pageyoffset)-whichit.clip.height)-17;
return false;
}
return false;
}
function dropit() {
whichit = null;
if(ns) window.releaseevents (event.mousemove);
return true;
}
<!-- drag drop code -->
if(ns) {
window.captureevents(event.mouseup|event.mousedown);
window.onmousedown = grabit;
window.onmousemove = moveit;
window.onmouseup = dropit;
}
if(ie) {
document.onmousedown = grabit;
document.onmousemove = moveit;
document.onmouseup = dropit;
}
if(ns || ie) action = window.setinterval("heartbeat()",1);
</script>
</body>
</html>
--------------------------------------
http://www.huoyue.com.cn 活跃网,活跃人群的论坛,访问活跃网,将给您带来意想不到的收获,还可以免费为您开论坛,让您免费拥有与朋友、网友交流的论坛。你是年轻人吗?你活跃你就上!
页:
[1]