网页素材代码共享~
最近正在做网站,一些代码没地方存,先放这~嘿嘿大家谁有一些特效代码也共享下吧~~~~
飞舞的图片
红色的是图片地址,改成你需要的。
<div id="img" style="position:absolute;">
<a href="http://www.chinallhc.tk/">
<img src="http://ldh210.home.bj001.net/xfile.php?xname=140GE01&fname=logo.gif" border="0"></a>
</div>
<script language="javascript">
<!--
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
// End -->
</script> 各种播放器代码
1.avi格式
代码片断如下:
<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="AutoRewind" value="0">
<param name="PlayCount" value="0">
<param name="Appearance value="0 value=""">
<param name="BorderStyle value="0 value=""">
<param name="MovieWindowHeight" value="240">
<param name="MovieWindowWidth" value="320">
<param name="FileName" value="file:///D|/work/vod/Mbar.avi">
<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="file:///D|/work/vod/Mbar.avi" src="Mbar.avi">
</embed>
</object>
2.mpg格式
代码片断如下:
<object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" id="ActiveMovie1" width="239" height="250">
<param name="Appearance" value="0">
<param name="AutoStart" value="-1">
<param name="AllowChangeDisplayMode" value="-1">
<param name="AllowHideDisplay" value="0">
<param name="AllowHideControls" value="-1">
<param name="AutoRewind" value="-1">
<param name="Balance" value="0">
<param name="CurrentPosition" value="0">
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableSelectionControls" value="0">
<param name="EnableTracker" value="-1">
<param name="Filename" value="../../../mpeg/halali.mpg" valuetype="ref">
<param name="FullScreenMode" value="0">
<param name="MovieWindowSize" value="0">
<param name="PlayCount" value="1">
<param name="Rate" value="1">
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="ShowControls" value="-1">
<param name="ShowDisplay" value="-1">
<param name="ShowPositionControls" value="0">
<param name="ShowTracker" value="-1">
<param name="Volume" value="-480">
</object>
3.smi格式
代码片断如下:
<OBJECT id=RVOCX classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=240
height=180>
<param name="_ExtentX" value="6350">
<param name="_ExtentY" value="4763">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="-1">
<param name="SRC" value="rm.rm">
<param name="CONTROLS" value="ImageWindow">
<param name="CONSOLE" value="console1">
<param name="LOOP" value="0">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000"><embed src="real.smi" type="audio/x-pn-realaudio-plugin" console="Console1" controls="ImageWindow" height="180" width="240" autostart="true"></OBJECT>
4.rm格式
代码片断如下:
<OBJECT ID=video1 CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT=288 WIDTH=352>
<param name="_ExtentX" value="9313">
<param name="_ExtentY" value="7620">
<param name="AUTOSTART" value="0">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<param name="SRC" value="rtsp://203.207.131.35/vod/dawan-a.rm";;>
<param name="CONTROLS" value="ImageWindow">
<param name="CONSOLE" value="Clip1">
<param name="LOOP" value="0">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000"><embed SRC type="audio/x-pn-realaudio-plugin" CONSOLE="Clip1" CONTROLS="ImageWindow" HEIGHT="288" WIDTH="352" AUTOSTART="false">
</OBJECT>
5.wmv格式
代码片断如下:
<object id="NSPlay" width=200 height=180 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" align="right" hspace="5">
<!-- ASX File Name -->
<param name="AutoRewind" value=1>
<param name="FileName" value="******.wmv">
<!-- Display Controls -->
<param name="ShowControls" value="1">
<!-- Display Position Controls -->
<param name="ShowPositionControls" value="0">
<!-- Display Audio Controls -->
<param name="ShowAudioControls" value="1">
<!-- Display Tracker Controls -->
<param name="ShowTracker" value="0">
<!-- Show Display -->
<param name="ShowDisplay" value="0">
<!-- Display Status Bar -->
<param name="ShowStatusBar" value="0">
<!-- Diplay Go To Bar -->
<param name="ShowGotoBar" value="0">
<!-- Display Controls -->
<param name="ShowCaptioning" value="0">
<!-- Player Autostart -->
<param name="AutoStart" value=1>
<!-- Animation at Start -->
<param name="Volume" value="-2500">
<param name="AnimationAtStart" value="0">
<!-- Transparent at Start -->
<param name="TransparentAtStart" value="0">
<!-- Do not allow a change in display size -->
<param name="AllowChangeDisplaySize" value="0">
<!-- Do not allow scanning -->
<param name="AllowScan" value="0">
<!-- Do not show contect menu on right mouse click -->
<param name="EnableContextMenu" value="0">
<!-- Do not allow playback toggling on mouse click -->
<param name="ClickToPlay" value="0">
</object>
wma\\\\\
放在 <body> 里面。下面是部分解释:
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" >
<param name="Filename" value="1.Wma"> <!--你文件的位置-->
<param name="PlayCount" value="1"><!--控制重复次数: “x”为几重复播放几次; x=0,无限循环。-->
<param name="AutoStart" value="0"><!--控制播放方式: x=1,打开网页自动播放; x=0,按播放键播放。-->
<param name="ClickToPlay" value="1"><!--控制播放开关: x=1,可鼠标点击控制播放或暂停状态; x=0,禁用此功能。-->
<param name="DisplaySize" value="0"><!--控制播放画面: x=0,原始大小; x=1,一半大小; x=2,2倍大小。-->
<param name="EnableFullScreen Controls" value="1"><!--控制切换全屏: x=1,允许切换为全屏; x=0,禁用此功能。-->
<param name="ShowAudio Controls" value="1"><!--控制音量: x=1,允许调节音量; x=0,禁止音量调节。-->
<param name="EnableContext Menu" value="1"><!--控制快捷菜单: x=1,允许使用右键菜单; x=0,禁用右键菜单。-->
<param name="ShowDisplay" value="1"><!--控制版权信息: x=1,显示电影及作者信息;x=0,不显示相关信息-->
</object > 将你网页中的<body>改为下面的代码就能得到相应的鼠标特效了。
代码:
01 绿色<BODY style='cursor:url(http://images.jojoo.net/gif/mouse.cur)'>
02花树枝 <BODY style='cursor:url(http://yuhou.net/work/images/xw_answer/liujg_xw_answer_nor.cur)'>
03 小点跟随<BODY style='cursor:url(http://yuhou.net/images/liujg_m030719.ani)'>
04 粉红玫瑰<BODY style='cursor:url(http://yuhou.net/build/images/03.cur)'>
05 钥匙<BODY style='cursor:url(http://asp.7i24.com/yhsjxe/book1/images/c.cur)'>
06 小手<BODY style='cursor:url(http://asp.7i24.com/yhsjxe/book1/images/c2.cur)'>
07 短笔<BODY style='cursor:url(http://asp.7i24.com/yhsjxe/links/01.cur)'>
08 太阳花<BODY style='cursor:url(http://lssm.wx-e.com/images/lssm.ani)'>
09 小色杆<BODY style='cursor:url(http://home.vipcp.net/kukumm/diary1/images/kuru2r.ani)'>
10 绿色样式剪头<BODY style='cursor:url(http://lengku.net//index/mouse.ani)'>
11 银色样式剪头<BODY style='cursor:url(http://nms.voline.net/aspsky/skins/dream/mouse.ani)'>
12 小老鼠<BODY style='cursor:url(http://e.1asphost.com/xiayule/guest7/pic/1.ani)'>
13 有点像猫<BODY style='cursor:url(http://asp2.6to23.com/whslj/lyb/pic/cur.ani)'>
14 美女头像<BODY style='cursor:url(http://e.1asphost.com/xiayule/guest10/pic/cur.ani)'>
15 小红鼠<BODY style='cursor:url(http://e.1asphost.com/xiayule/guest11/pic/cur.ani)'>
16 小粉猪<BODY style='cursor:url(http://e.1asphost.com/xiayule/guest8/pic/cur.ani)'>
17 小美女加小煎头<BODY style='cursor:url(http://e.1asphost.com/xiayule/guest12/pic/cur.ani)'>
18 蝴蝶<BODY style='cursor:url(http://asp2.6to23.com/rlf/gb3/pic/cur.ani)'>
19 小钟点样式<BODY style='cursor:url(http://asp2.6to23.com/peg3/clover3/pic/cur.ani)'>
20 十字<BODY style='cursor:url(http://asp2.6to23.com/peg3/sky/pic/cross.ani)'>
21 样式剪头<BODY style='cursor:url(http://asp2.6to23.com/peg3/sky/pic/cur.ani)'>
22 银杆<BODY style='cursor:url(http://asp2.6to23.com/peg3/sd/pic/cur.cur)'>
23 带头粉红杆<BODY style='cursor:url(http://asp2.6to23.com/peg3/sakura/pic/cur.ani)'>
24 两十字<BODY style='cursor:url(http://www.bluenuo.com/gbbear/pic/cur.ani)'>
25 兔头<BODY style='cursor:url(http://50net.com/book/img2/1.ani)'>
26 螺旋<BODY style='cursor:url(http://50net.com/home/ani5.ani)'>
27 花<BODY style='cursor:url(http://50net.com/forest/1.ico)'>
28 花<BODY style='cursor:url(http://50net.com/forest/2.ico)'>
29 动态小鼠<BODY style='cursor:url(http://www.kulongnvhai.com/free/pic/cur.ani)'>
30 尾动灰色<BODY style='cursor:url(http://fhwep.lwang.net/Images/Wag3dg.ani)'>
31 三角<BODY style='cursor:url(http://fhwep.lwang.net/Images/Wag3dw.ani)'>
建议您将鼠标的样式文件下载后,上传到自己的网站上。免得无法显示。
也可以用下面的代码:
动态鼠标的插入
在<head>与</head>之间插入:
<style type=text/css>
a:hover {cursor:url('**.cur')}
BODY {cursor:url('**.cur')}
</style>
说明:
1、( )号中的为你的图标的路径,后缀名还有**.ico的,和**.ani的.
2、第一个路径是接触链接时的指针。第二个路径是鼠标移动时的指针。
后缀名为**.ico 的为静态
后缀名为**.cur 的为静态
后缀名为**.ani 的为动画 页面特效勤劳的小蜜蜂采蜜中...
要完成此效果需要两个步骤
第一步:把如下代码加入到<body>区域中
<SCRIPT language=JavaScript>
function DynLayer(id,nestref,frame) {
if (!is.ns5 && !DynLayer.set && !frame) DynLayerInit()
this.frame = frame || self
if (is.ns) {
if (is.ns4) {
if (!frame) {
if (!nestref) var nestref = DynLayer.nestRefArray
if (!DynLayerTest(id,nestref)) return
this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers
}
else this.css = (nestref)? eval("frame.document."+nestref+".document."+id) : frame.document.layers
this.elm = this.event = this.css
this.doc = this.css.document
}
else if (is.ns5) {
this.elm = document.getElementById(id)
this.css = this.elm.style
this.doc = document
}
this.x = this.css.left
this.y = this.css.top
this.w = this.css.clip.width
this.h = this.css.clip.height
}
else if (is.ie) {
this.elm = this.event = this.frame.document.all
this.css = this.frame.document.all.style
this.doc = document
this.x = this.elm.offsetLeft
this.y = this.elm.offsetTop
this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth
this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight
}
this.id = id
this.nestref = nestref
this.obj = id + "DynLayer"
eval(this.obj + "=this")
}
function DynLayerMoveTo(x,y) {
if (x!=null) {
this.x = x
if (is.ns) this.css.left = this.x
else this.css.pixelLeft = this.x
}
if (y!=null) {
this.y = y
if (is.ns) this.css.top = this.y
else this.css.pixelTop = this.y
}
}
function DynLayerMoveBy(x,y) {
this.moveTo(this.x+x,this.y+y)
}
function DynLayerShow() {
this.css.visibility = (is.ns4)? "show" : "visible"
}
function DynLayerHide() {
this.css.visibility = (is.ns4)? "hide" : "hidden"
}
DynLayer.prototype.moveTo = DynLayerMoveTo
DynLayer.prototype.moveBy = DynLayerMoveBy
DynLayer.prototype.show = DynLayerShow
DynLayer.prototype.hide = DynLayerHide
DynLayerTest = new Function('return true')
function DynLayerInit(nestref) {
if (!DynLayer.set) DynLayer.set = true
if (is.ns) {
if (nestref) ref = eval('document.'+nestref+'.document')
else {nestref = ''; ref = document;}
for (var i=0; i<ref.layers.length; i++) {
var divname = ref.layers.name
DynLayer.nestRefArray = nestref
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'","'+nestref+'")')
}
if (ref.layers.document.layers.length > 0) {
DynLayer.refArray = (nestref=='')? ref.layers.name : nestref+'.document.'+ref.layers.name
}
}
if (DynLayer.refArray.i < DynLayer.refArray.length) {
DynLayerInit(DynLayer.refArray)
}
}
else if (is.ie) {
for (var i=0; i<document.all.tags("DIV").length; i++) {
var divname = document.all.tags("DIV").id
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')
}
}
}
return true
}
DynLayer.nestRefArray = new Array()
DynLayer.refArray = new Array()
DynLayer.refArray.i = 0
DynLayer.set = false
function DynLayerSlideTo(endx,endy,inc,speed,fn) {
if (endx==null) endx = this.x
if (endy==null) endy = this.y
var distx = endx-this.x
var disty = endy-this.y
this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}
function DynLayerSlideBy(distx,disty,inc,speed,fn) {
var endx = this.x + distx
var endy = this.y + disty
this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}
function DynLayerSlideStart(endx,endy,distx,disty,inc,speed,fn) {
if (this.slideActive) return
if (!inc) inc = 10
if (!speed) speed = 20
var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc
if (num==0) return
var dx = distx/num
var dy = disty/num
if (!fn) fn = null
this.slideActive = true
this.slide(dx,dy,endx,endy,num,1,speed,fn)
}
function DynLayerSlide(dx,dy,endx,endy,num,i,speed,fn) {
if (!this.slideActive) return
if (i++ < num) {
this.moveBy(dx,dy)
this.onSlide()
if (this.slideActive) setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+num+","+i+","+speed+",\""+fn+"\")",speed)
else this.onSlideEnd()
}
else {
this.slideActive = false
this.moveTo(endx,endy)
this.onSlide()
this.onSlideEnd()
eval(fn)
}
}
function DynLayerSlideInit() {}
DynLayer.prototype.slideInit = DynLayerSlideInit
DynLayer.prototype.slideTo = DynLayerSlideTo
DynLayer.prototype.slideBy = DynLayerSlideBy
DynLayer.prototype.slideStart = DynLayerSlideStart
DynLayer.prototype.slide = DynLayerSlide
DynLayer.prototype.onSlide = new Function()
DynLayer.prototype.onSlideEnd = new Function()
function DynLayerClipInit(clipTop,clipRight,clipBottom,clipLeft) {
if (is.ie) {
if (arguments.length==4) this.clipTo(clipTop,clipRight,clipBottom,clipLeft)
else if (is.ie4) this.clipTo(0,this.css.pixelWidth,this.css.pixelHeight,0)
}
}
function DynLayerClipTo(t,r,b,l) {
if (t==null) t = this.clipValues('t')
if (r==null) r = this.clipValues('r')
if (b==null) b = this.clipValues('b')
if (l==null) l = this.clipValues('l')
if (is.ns) {
this.css.clip.top = t
this.css.clip.right = r
this.css.clip.bottom = b
this.css.clip.left = l
}
else if (is.ie) this.css.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)"
}
function DynLayerClipBy(t,r,b,l) {
this.clipTo(this.clipValues('t')+t,this.clipValues('r')+r,this.clipValues('b')+b,this.clipValues('l')+l)
}
function DynLayerClipValues(which) {
if (is.ie) var clipv = this.css.clip.split("rect(").split(")").split("px")
if (which=="t") return (is.ns)? this.css.clip.top : Number(clipv)
if (which=="r") return (is.ns)? this.css.clip.right : Number(clipv)
if (which=="b") return (is.ns)? this.css.clip.bottom : Number(clipv)
if (which=="l") return (is.ns)? this.css.clip.left : Number(clipv)
}
DynLayer.prototype.clipInit = DynLayerClipInit
DynLayer.prototype.clipTo = DynLayerClipTo
DynLayer.prototype.clipBy = DynLayerClipBy
DynLayer.prototype.clipValues = DynLayerClipValues
function DynLayerWrite(html) {
if (is.ns) {
this.doc.open()
this.doc.write(html)
this.doc.close()
}
else if (is.ie) {
this.event.innerHTML = html
}
}
DynLayer.prototype.write = DynLayerWrite
function BrowserCheck() {
var b = navigator.appName
if (b=="Netscape") this.b = "ns"
else if (b=="Microsoft Internet Explorer") this.b = "ie"
else this.b = b
this.version = navigator.appVersion
this.v = parseInt(this.version)
this.ns = (this.b=="ns" && this.v>=4)
this.ns4 = (this.b=="ns" && this.v==4)
this.ns5 = (this.b=="ns" && this.v==5)
this.ie = (this.b=="ie" && this.v>=4)
this.ie4 = (this.version.indexOf('MSIE 4')>0)
this.ie5 = (this.version.indexOf('MSIE 5')>0)
this.min = (this.ns||this.ie)
}
is = new BrowserCheck()
function css(id,left,top,width,height,color,vis,z,other) {
if (id=="START") return '<STYLE TYPE="text/css">\n'
else if (id=="END") return '</STYLE>'
var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
if (arguments.length>=5 && height!=null) {
str += ' height:'+height+'px;'
if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
}
if (arguments.length>=6 && color!=null) str += (is.ns)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
if (arguments.length==9 && other!=null) str += ' '+other
str += '}\n'
return str
}
function writeCSS(str,showAlert) {
str = css('START')+str+css('END')
document.write(str)
if (showAlert) alert(str)
}
</SCRIPT>
<SCRIPT language=JavaScript>
function Drag() {
this.obj = null
this.array = new Array()
this.dropTargets = new Array()
this.active = false
this.offsetX = 0
this.offsetY = 0
this.zIndex = 0
this.resort = true
this.add = DragAdd
this.addTargets = DragAddTargets
this.checkTargets = DragCheckTargets
this.targetHit == null
this.remove = DragRemove
this.setGrab = DragSetGrab
this.mouseDown = DragMouseDown
this.mouseMove = DragMouseMove
this.mouseUp = DragMouseUp
this.onDragStart = new Function()
this.onDragMove = new Function()
this.onDragEnd = new Function()
this.onDragDrop = new Function()
}
function DragAdd() {
for (var i=0; i<arguments.length; i++) {
var l = this.array.length
this.array = arguments
this.array.dragGrab = new Array(0,this.array.w,this.array.h,0)
this.zIndex += 1
}
}
function DragAddTargets() {
for (var i=0; i<arguments.length; i++) {
var l = this.dropTargets.length
this.dropTargets = arguments
this.dropTargets.dragGrab = new Array(0,this.dropTargets.w,this.dropTargets.h,0)
}
}
function DragSetGrab(dynlayer,top,right,bottom,left) {
dynlayer.dragGrab = new Array(top,right,bottom,left)
}
function DragRemove() {
for (var i=0; i<arguments.length; i++) {
for (var j=0; j<this.array.length; j++) {
if (this.array==arguments) {
for (var k=j;k<=this.array.length-2;k++) this.array = this.array
this.array = null
this.array.length -= 1
break
}
}
}
}
function DragMouseDown(x,y) {
for (var i=this.array.length-1;i>=0;i--) {
var lyr = this.array
if (checkWithinLayer(x,y,lyr)) {
this.obj = this.array
this.offsetX = x-this.obj.x
this.offsetY = y-this.obj.y
this.active = true
break
}
}
if (!this.active) return false
else {
if (this.resort) {
this.obj.css.zIndex = this.zIndex++
for (var j=i;j<=this.array.length-2;j++) this.array = this.array
this.array = this.obj
}
this.onDragStart(x,y)
return true
}
}
function DragMouseMove(x,y) {
if (!this.active) return false
else {
this.obj.moveTo(x-this.offsetX,y-this.offsetY)
this.onDragMove(x,y)
return true
}
}
function DragMouseUp(x,y) {
if (!this.active) return false
else {
this.active = false
if (this.checkTargets()) this.onDragDrop()
this.onDragEnd(x,y)
return true
}
}
function DragCheckTargets() {
for (i in this.dropTargets) {
var lyr = this.dropTargets
if (checkWithinLayer(lyr.x,lyr.y,this.obj) ||
checkWithinLayer(lyr.x+lyr.w,lyr.y,this.obj) ||
checkWithinLayer(lyr.x,lyr.y+lyr.h,this.obj) ||
checkWithinLayer(lyr.x+lyr.w,lyr.y+lyr.h,this.obj) ||
checkWithinLayer(this.obj.x,this.obj.y,lyr) ||
checkWithinLayer(this.obj.x+this.obj.w,this.obj.y,lyr) ||
checkWithinLayer(this.obj.x,this.obj.y+this.obj.h,lyr) ||
checkWithinLayer(this.obj.x+this.obj.w,this.obj.y+this.obj.h,lyr)) {
this.targetHit = lyr
return true
}
}
return false
}
function checkWithin(x,y,left,right,top,bottom) {
if (x>=left && x<right && y>=top && y<bottom) return true
else return false
}
function checkWithinLayer(x,y,lyr) {
if (checkWithin(x,y,lyr.x+lyr.dragGrab,lyr.x+lyr.dragGrab,lyr.y+lyr.dragGrab,lyr.y+lyr.dragGrab)) return true
else return false
}
drag = new Drag()
</SCRIPT>
<SCRIPT language=JavaScript>
<!--
for (var i=0;i<=4;i++) {
eval("bee_r"+i+" = new Image()")
eval("bee_r"+i+".src = '../txtx/images/115/bee-r"+i+".gif'")
eval("bee_l"+i+" = new Image()")
eval("bee_l"+i+".src = '../txtx/images/115/bee-l"+i+".gif'")
}
function init() {
flower1 = new DynLayer('flower1Div')
bee1 = new Bee('bee1Bee',null,flower1)
drag.resort = false
drag.add(flower1)
document.onmousedown = mouseDown
document.onmousemove = mouseMove
document.onmouseup = mouseUp
if (is.ns) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP)
}
function mouseDown(e) {
if ((is.ns && e.which!=1) || (is.ie && event.button!=1)) return true
var x = (is.ns)? e.pageX : event.x+document.body.scrollLeft
var y = (is.ns)? e.pageY : event.y+document.body.scrollTop
if (drag.mouseDown(x,y)) {
return false
}
else return true
}
function mouseMove(e) {
var x = (is.ns)? e.pageX : event.x+document.body.scrollLeft
var y = (is.ns)? e.pageY : event.y+document.body.scrollTop
if (drag.mouseMove(x,y)) {
bee1.startFly()
return false
}
else return true
}
function mouseUp(e) {
var x = (is.ns)? e.pageX : event.x+document.body.scrollLeft
var y = (is.ns)? e.pageY : event.y+document.body.scrollTop
if (drag.mouseUp()) {
return false
}
else return true
}
function Bee(id,nestref,flower) {
this.dynlayer = DynLayer
this.dynlayer(id,nestref)
this.i1 = new DynLayer(id+'i1',id)
this.i2 = new DynLayer(id+'i2',id)
this.flower = flower
this.flyactive = false
this.animactive = false
this.animcount = 0
this.direction = "r"
this.animdir = 1
this.amplitude = 35
this.angleinc = 10
this.hoverangle = 0
this.centerX = this.x
this.centerY = this.y
this.startFly = BeeStartFly
this.fly = BeeFly
this.animate = BeeAnimate
this.land = BeeLand
}
Bee.prototype = DynLayer.prototype
function BeeStartFly() {
if (!this.flyactive) {
var distx = Math.abs(this.x+8-this.flower.x)
var disty = Math.abs(this.y+8-this.flower.y)
if (Math.sqrt(Math.pow(distx,2)+Math.pow(disty,2)) > 35) {
this.slideActive = false
this.animactive = true
this.animate()
this.flyactive = true
this.fly()
}
}
}
function BeeFly() {
if (this.flyactive) {
var distx = Math.abs(this.x+8-this.flower.x)
var disty = Math.abs(this.y+8-this.flower.y)
if (Math.sqrt(Math.pow(distx,2)+Math.pow(disty,2)) > 40 || distx > 15) {
var angle = Math.floor(Math.atan(disty/distx)*180/Math.PI)
if (distx==0 && disty==0) angle = 0
if (this.flower.x>=this.x+8) {
if (this.flower.y<=this.y+8) angle = angle // 0 to 90
else angle = 360-angle // 270 to 360
this.direction = "r"
}
else {
if (this.flower.y<=this.y+8) angle = 180-angle // 90 to 180
else angle = 180+angle // 180 to 270
this.direction = "l"
}
this.centerX += 3*Math.cos(angle*Math.PI/180)
this.centerY -= 3*Math.sin(angle*Math.PI/180)
this.hoverangle += this.angleinc
this.moveTo(this.centerX,this.centerY-this.amplitude*Math.sin(this.hoverangle*Math.PI/180))
setTimeout(this.obj+'.fly()',20)
}
else {
this.flyactive = false
this.slideTo(this.flower.x+3,this.flower.y-5,2,20,this.obj+".land()")
}
}
}
function BeeAnimate() {
if (this.animactive) {
this.i1.doc.images.src = eval('bee_'+this.direction+Math.floor(5*Math.random())+'.src')
this.i2.doc.images.src = eval('bee_'+this.direction+Math.floor(5*Math.random())+'.src')
setTimeout(this.obj+'.animate()',20)
}
}
function BeeLand() {
this.centerX = this.x
this.centerY = this.y
this.hoverangle = 0
if (!this.flyactive) {
this.i1.doc.images.src = bee_r1.src
this.i2.doc.images.src = bee_r1.src
this.animactive = 0
}
}
//-->
</SCRIPT>
<STYLE type=text/css>#bee1Bee { LEFT: 100px; WIDTH: 16px; POSITION: absolute; TOP: 100px; HEIGHT: 16px}#bee1Beei1 { LEFT: 0px; WIDTH: 16px; POSITION: absolute; TOP: 0px; HEIGHT: 16px}#bee1Beei2 { LEFT: 0px; WIDTH: 16px; POSITION: absolute; TOP: 0px; HEIGHT: 16px}#flower1Div { LEFT: 120px; WIDTH: 45px; POSITION: absolute; TOP: 120px; HEIGHT: 72px}</STYLE><DIV id=flower1Div><IMG height=72 src="../ts/pic/flower.gif" width=45></DIV><DIV id=bee1Bee><DIV id=bee1Beei1><IMG height=16 src="../ts/pic/bee.gif" width=16 name=bee1Beei1Img></DIV><DIV id=bee1Beei2><IMG height=16 src="../ts/pic/bee.gif" width=16 name=bee1Beei2Img></DIV></DIV>
第二步:把“onload=init()”<body>标记里
例如:<body onload=init()> 页面抖动警告
要完成此效果把如下代码加入到<body>区域中
<SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="../img/logo.gif"></A><SCRIPT language=JavaScript1.2>
<!--
function boom(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
}
}
}
}
function callJS(jsStr) {
return eval(jsStr)
}
-->
</SCRIPT>
<A href="#" onmouseover="javascript:callJS('boom(3)');">
<IMG border=0 src="http://www.jojoo.net/ts/pic/gif/3.gif"></A> 禁止图片下载的脚本
把如下代码加入<body>区域中
<A HREF="javascript:void(0)" onMouseover="alert('对不起,图片不能随便下载!')"><IMG SRC="j2.gif" tppabs="http://www.csdn.net/javascript/j2.gif" Align="center" Border="0" width="99" height="50"></A> 图片和文字同时向左滚动的Javascript代码<BODY>
<SCRIPT language=JavaScript1.2>
<!--
var sliderwidth=400
var sliderheight=120
var slidespeed=5
var leftrightslide=new Array()
var finalslide=''
leftrightslide='<a href="http://chinaluoyang.net/" target="_blank">中国洛阳</a>'
leftrightslide='<a href="http://chinaluoyang.net/" target="_blank"><img title=""src="http://ChinaLuoyang.Net/images/logo.gif" border=0></a>'
leftrightslide='<a href="http://chinaluoyang.net" target="_blank"><img title=""src="http://chinaluoyang.net/images/logocnluoyang.gif" border=0></a>'
//copy contents of leftrightslide into one variable
for (i=0;i<leftrightslide.length;i++)
finalslide=finalslide+leftrightslide+""
if (document.all){
//dynamically write out the marquee tag
document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>')
//stop marquee when mouse is over it
ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
//re-enable marquee when mouse is out
ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed")
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
document.ns_slider01.visibility="show"
setTimeout("window.onresize=regenerate",450)
intializeleftrightslide()
}
if (document.all)
ieslider.scrollAmount=slidespeed
}
//NS specific function for initializing slider upon page load
function intializeleftrightslide(){
document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>')
document. ns_slider01.document.ns_slider02.document.close()
thelength=document.ns_slider01.document.ns_slider02.document.width
scrollslide()
}
//NS specific function for sliding slideshow
function scrollslide(){
if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){
document.ns_slider01.document.ns_slider02.left-=slidespeed
setTimeout("scrollslide()",100)
}
else{
document.ns_slider01.document.ns_slider02.left=sliderwidth
scrollslide()
}
}
window.onload=regenerate2
//-->
</SCRIPT>
</BODY> 国际顶级域名免费申请。www.***.tk
申请步骤:
进http://www.dot.tk/
右边方框
Find your domain name now!
这里输入你要申请的 .tk
点击OK
如果已经被人申请
第二步会叫你选择一个其他的
——————
还未被申请:
——————
下面绿色字体:
Type of registration
Please select your registration
FREE DOMAIN NAME(选择这个)
Dot tk paid registration
Where do you live?
Please select the country where you live
在下面选择国家CHINA
点击continue
_______________
下一页
————————
依次填写
你的转入地址
你的网站介绍
网站分类(随便选)
网站语言(默认为english,我选择chinese)
点击continue
————————
下一页
————————
连着的8格要你输入你网站的关键字
QQ2000每个都是输入laiwanglin通过
当然,你可以输入你主页的关键字
接下来依次:
随便选
下面的空格要你写入你在下面图片看见的文字!!
点击continue
________________
下一页
________________
依次:
名字
地址
邮编
城市
省份
电话号码(填写正确的位数)
传真号码(填写正确的位数)
性别
年龄
职业
你的邮箱(请填写正确的邮箱!!QQ2000用了263的邮箱没有收到确认信!!用163.com的邮箱或hotmail成功!)
密码
重复密码
方框打勾
点击continue
____________
申请成功!!
____________
马上收到信
收到信内容如下
____________
Malo ni!
and thank you (faka fetai)
for registering with Dot tk!
Your e-mail address : 6284578@163.com
password: ***********
confirmation code: tk2285355
(please note: this is not your password)
As you know we like to keep things simple, so all you need
to do to activate your Dot tk address is...
1. Go to http://my.dot.tk/cgi-bin/confirm.taloha?tk=4201410
2. Enter your confirmation code
If you have received this email, but did not join us @ Dot tk,
then somebody tried to register using your e-mail address.
In thase case, you can simply ignore this message... But why not come on in,
and see for yourself if your own -free- domain name is still
available at http://www.dot.tk
Any questions? Please visit our feedback page at
http://www.dot.tk/cgi-bin/response.taloha
Hope to see you soon at Dot tk.
Dot tk -- Dividing Domains Differently.
演示
http://www.qq2000.tk/
tk域名去广告方法
首先打开http://my.dot.tk/cgi-bin/login01.taloha,用你的TK账号登陆,在左边找到Dot TK Linker Promo这个选项,进去后在下面的Please select your Dot tk domain name中选择你要修改你玉米,点下一步。
里面一个有3个选项,选这个 No, thanks, I don't want to have a banner on my website. I am not interested in being selected for a review on Dot TK's website or a great Dot TK Polo Shirt. 就可以了。然后按最下面确认。大约几分钟你的tk玉米就没广告了。
演示:http://www.qq2000.tk
设置自己域名邮箱方法:(转发邮箱)
登陆后选择:Dot tk Email
选择自己的域名,下一步
Your (new) virtual address:你要建立的邮箱
...to be forwarded to email address: 你要转向的邮箱
确定。 呵呵....不错,不过这些代码在网上很多的...................
页:
[1]