网页代码大全,适合做留言本的代码(不定期更新)
梦想边缘の做图培训基地吧
全部回复
仅看楼主
level 1
1.图片代替滚动条,控制层的上下滚动(不推荐在留言本里使用.......因为用了的话.......就不能用别的了......)



<!--function MoveTextDiv(obj,action){//上下移动层function UpMove(){if(TextScroll.offsetTop<0){TextScroll.style.pixelTop+=1;}}function DownMove(){if(TextScroll.offsetTop>(TextScrollBox.offsetHeight-TextScroll.offsetHeight)){TextScroll.style.pixelTop-=1;}}scro=setInterval(action=="up"?UpMove:DownMove,10);function obj.onmouseout(){clearInterval(scro);}}--> 2.定义彩色字(我也米事过.......看不懂.....谁看懂教我啊~~~)
自选风格3.给滚动条换色(推荐!)
body {SCROLLBAR-FACE-COLOR:#3333FF;(立体滚动条凸出部分的颜色)SCROLLBAR-HIGHLIGHT-COLOR:#505050;(滚动条空白部分的颜色)SCROLLBAR-SHADOW-COLOR:#fc2400;(立体滚动条阴影的颜色)SCROLLBAR-ARROW-COLOR:#666666;(上下按钮上三角箭头的颜色)SCROLLBAR-BASE-COLOR:#333333; (滚动条的基本颜色)SCROLLBAR-DARK-SHADOW-COLOR:#b4fc48} (立体滚动条强阴影的颜色) 
2005年08月11日 01点08分 1
level 1
下面的素曲素发的,偶转过来鼠标样式一般用css代码修改,例如:
BODY{cursor:url("鼠标文件地址");}(鼠标文件一般为.ani或者为.cur格式。)也可以修改成常见的样式,例如只是修改成手形鼠标:
BODY{cursor:hand} 这个:(好象是弹出窗口.....)
alert("欢迎到访!");或者这种
msgbox "欢迎到访!"HTML补充 (本页中灰色的代码可以直接插入到留言本的顶部文字代码或者底部文字代码中) html最常用标签:1,
设置文字的颜色大小等。例如:
这是蓝色的字 显示效果: 这是蓝色的字
橙色的较大的文字显示效果: 橙色的较大的文字color的值表示颜色,size 表示文字大小了解详细文档>>javascript代码:现在列举两个方案来实现右健跳出提示的效果:方案一:直接在留言本顶部文字代码或者底部文字代码中填写:
document.onmousedown=function(){ if(event.button==2)alert("不许你用右键,哈哈");} 方案二:把
和的中间部分copy出来,存为单独的文件code.js,code.js的内容是:document.onmousedown=function(){ if(event.button==2)alert("不许你用右键,哈哈");}如果你有主页空间,将code.js这个文件上传到你的主页空间,上传后如果地址是:http://your.somewhere.com/code.js 那么在留言本顶部文字代码或者底部文字代码中填写:
将实现同方案一同样的效果。这样就是说,如果代码按方案一填写,可能会提示代码过长,那么用方案二,基本上就不会超过长度了。将播放音乐文件的代码加入到留言本的“顶部代码”或者“底部代码”中就可以了。常用的两种代码,一种是使用这段代码,这是从一个留言本里面copy过来的:
src="音乐文件地址"src的值是音乐文件的地址,例如:http://bluemask.net/ffsI.mid;loop="-1"loop的值表示循环的次数,-1表示一直循环,如果换成其他整数,如2,将循环两次。此代码适用于mid, wav, mp3等格式,建议音乐文件不要太大,不建议使用mp3格式。另一种是:
这种代码的好处是可以边下载边播放,如果需要还可以显示出播放面板,适用于wmv, mp3, mpeg,rm,ram等许多格式的媒体文件。 加入flash影片的代码和加入音乐的代码差不多:)
把其中的“flash文件地址”改为你所想要插入播放的flash文件的地址就可以了。其中的“width=500”和“height=400”为被播放的flash文件的尺寸,根据具体情况可能需要修改。 弹出提示框“不许你用右键”的代码:
document.onmousedown=function(){ if(event.button==2)alert("不许你用右键,哈哈");} 点右键没用动作的代码:
document.oncontextmenu=function(){return false;} 半透明代码:
table {FILTER: Alpha(opacity=60);} 放置魔法表情——在这里申请:http://magicface.knowsky.com/然后把它提供的代码放到留言本里 放置播放器:在这里申请:http://www.94200.com/freebgm/然后把它提供的代码放到留言本里,并在修改好后,给播放器添加歌曲 添加免费记数器:在这里申请:http://www.2881.com/count/然后放置它提供的代码
textarea{ border: 1px dotted #F9B0F9; background-color:transparent; transparent; font-size:9pt; font-family:verdana; color:#F9B0F9}input{ border:1px dotted #F9B0F9; background-color:transparent; transparent; font-size:9pt; font-family:verdana; color:#F9B0F9}
BODY{cursor:url ("<Script'>http://booboo.2230.net/ly/sb/08.ani");}
document.oncontextmenu=function(){return false;}虚线框代码 哈~~~~米经过你同意.........现在问下.....可以不,偶懒得找了.....
2005年08月11日 01点08分 2
level 2
莹夕……偶爱死你了……还有米???(要转随便转,偶都是转的咧)
2005年08月11日 02点08分 3
level 1
接第一层4.隐藏滚动条5.滚屏显示
var currentpos,timer;function initialize(){timer=setInterval("scrollwindow()",10);}function sc(){clearInterval(timer);}function scrollwindow(){currentpos=document.body.scrollTop;window.scroll(0,++currentpos);if (currentpos != document.body.scrollTop)sc();}document.onmousedown=sc document.ondblclick=initialize 6.在IE地址栏上加上个性图标
7.无边框窗口的制作
minimizebar="minimize.gif"; //窗口右上角最小化“按钮”的图片 minimizebar2="minimize2.gif"; //鼠标悬停时最小化“按钮”的图片 closebar="close.gif"; //窗口右上角关闭“按钮”的图片 closebar2="close2.gif"; //鼠标悬停时关闭“按钮”的图片 icon="icon.gif"; //窗口左上角的小图标 function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr) //定义一个弹出无边窗口的函数,能数意义见下面“参数说明”,实际使用见最后的实例。 /* ------------------参数说明------------------- fileName :无边窗口中显示的文件。 w     :窗口的宽度。 h     :窗口的高度。 titleBg :窗口“标题栏”的背景色以及窗口边框颜色。 moveBg :窗口拖动时“标题栏”的背景色以及窗口边框颜色。 titleColor :窗口“标题栏”文字的颜色。 titleWord :窗口“标题栏”的文字。 scr :是否出现滚动条。取值yes/no或者1/0。 -------------------------------------------- */ { var contents="<html>"+ "<head>"+ "<title>"+titleWord+"</title>"+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">"+ "<object id=hhctrl type=application/x-oleobject classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11><param name=Command value=minimize></object>"+ "</head>"+ "<body topmargin=0 leftmargin=0 scroll=no onselectstart=return false ondragstart=return false>"+ " <table height=100% width=100% cellpadding=0 cel
lsp
acing=1 bgcolor="+titleBg+" id=mainTab>"+ " <tr height=18 style=cursor:default; onmousedown=x=event.x;y=event.y;setCapture();mainTab.bgColor=\""+moveBg+"\"; onmouseup=releaseCapture();mainTab.bgColor=\""+titleBg+"\"; onmousemove=if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);>"+ " <td width=18 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+ " <td width="+w+"><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+ " <td width=14><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src="+minimizebar2+" onmouseout=this.src="+minimizebar+"></td>"+ " <td width=13><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src="+closebar2+" onmouseout=this.src="+closebar+"></td>"+ " </tr>"+ " <tr height=*>"+ " <td colspan=4>"+ " <iframe name=nbw_v6_iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+ " </td>"+ " </tr>"+ " </table>"+ "</body>"+ "</html>"; pop=window.open("","_blank","fullscreen=yes"); pop.resizeTo(w,h); pop.moveTo((screen.width-w)/2,(screen.height-h)/2); pop.document.writeln(contents); if(pop.document.body.clientWidth!=w||pop.document.body.clientHeight!=h) //如果无边窗口不是出现在纯粹的IE窗口中 { temp=window.open("","nbw_v6"); temp.close(); window.showModalDialog("about:<"+"script language=javascript>window.open(,nbw_v6,fullscreen=yes);window.close();"+"</"+"script>","","dialogWidth:0px;dialogHeight:0px"); pop2=window.open("","nbw_v6"); pop2.resizeTo(w,h); pop2.moveTo((screen.width-w)/2,(screen.height-h)/2); pop2.document.writeln(contents); pop.close(); } }
open
open

无滚动条的   
2005年08月11日 02点08分 4
level 2
好多……超过限制了啦……
2005年08月11日 02点08分 5
level 1
以下都为精华.....1。忽视右键   或 2.让你的网页无法另存为
<iframe src=*></iframe> 3.草莓滚动条(多的吓人)
var scrollbar = "../image/scrollbar2.gif";var uparrow = "../image/up2.gif";var downarrow = "../image/down2.gif";var barbg = "../image/barbg.gif";
ns4 = (document.layers)?true:falseie4 = (document.all)?true:falsedom = (document.getElementById)?true:falsevar mouseXvar mouseYvar idvar clickvar clickDragvar contentYvar contentHvar barYvar barSize = 16var scrollTimer = setTimeout("",500)var btnSize = 16var speed = 6var heightvar boxCSS = "<style type='text/css'>\n"var boxHTML = "<span id='tommyyoungClip'><span id='tommyyoung'></span></span>\n"hasScroll = trueboxes = new Array()function scrollBox(x, y, w, h, i){ l = boxes.length boxes[l] = this this.x = x this.y = y this.w = w this.h = h this.i = i this.upY = y this.downY = y + (h - btnSize) this.downX = x + (w - btnSize) boxCSS += "#"+i+"Clip {position:absolute;top:"+y+";left:"+x+";height:"+h+";width:"+w+";clip:rect(0,"+w+","+h+",0);overflow:hidden;z-index:10}\n" boxCSS += "#"+i+" {position:absolute;left:0;top:0;width:"+(w-btnSize)+";}\n" boxCSS += "#"+i+"barBg {position:absolute;top:"+y+";left:"+(x+(w-btnSize))+";height:"+h+";width:"+btnSize+";background-image:url('"+ barbg +"');layer-background-image:url('"+ barbg +"');z-index:11}" boxHTML += "<span id="+i+"barBg> </span>" boxCSS += "#"+i+"verBar {position:absolute;top:"+(y+btnSize)+";left:"+(x+(w-btnSize))+";height:13;width:13;z-index:13}\n" boxHTML += "<span id='"+i+"verBar'><img src='"+ scrollbar +"' width='16' height='16' border='0'></span>\n" boxCSS += "#"+i+"UpBtn {position:absolute;top:"+y+";left:"+(x+(w-btnSize))+";height:13;width:13;z-index:13}\n" boxHTML += "<span id='"+i+"UpBtn'><img src='"+ uparrow +"' width='13' height='13' border='0'></span>\n" boxCSS += "#"+i+"DnBtn {position:absolute;top:"+(y+(h-btnSize))+";left:"+(x+(w-btnSize))+";z-index:13}\n" boxHTML += "<span id='"+i+"DnBtn' style=''><img src='"+ downarrow +"' width='13' height='13' border='0'></span>\n"}function scrollCSS(){ boxCSS += "</style>\n" document.open() document.write(boxCSS) document.close()}function scrollHTML(){ document.open() document.write(boxHTML) document.close() for (l = 0;l < boxes.length; l++){ i = boxes[l].i if (dom){ document.getElementById(i).contentH = document.getElementById(i).offsetHeight document.getElementById(i).style.top = 0 document.getElementById(i+"verBar").y = boxes[l].y + btnSize if (document.getElementById(i).contentH < boxes[l].h) document.getElementById(i+"verBar").style.visibility = "hidden" } else if (ie4){ document.all.contentH = document.all.offsetHeight document.all.style.top = 0 document.all[i+"verBar"].y = boxes[l].y + btnSize
2005年08月11日 02点08分 6
level 1
if (document.all.contentH < boxes[l].h) document.all[i+"verBar"].style.visibility = "hidden" } else if (ns4){ document[i+"Clip"].document.contentH = document[i+"Clip"].document.document.height document[i+"verBar"].y = boxes[l].y + btnSize if (document[i+"Clip"].document.contentH < boxes[l].h) document[i+"verBar"].visibility = "hide" } }}function down(e){ getMouse(e) for (i=0; i < boxes.length; i++) { box = boxes[l] if (mouseY > box.y && mouseY < (box.y + box.h) && mouseX > box.downX && mouseX < (box.downX + btnSize) ) { id = box.i height = box.h barStop = (box.y + box.h) - (barSize + btnSize) barT = box.y + btnSize if (dom) dragTop = document.getElementById(id+"verBar").y if (ie4) dragTop = document.all[id+"verBar"].y if (ns4) dragTop = document[id+"verBar"].y if (mouseY > box.upY && mouseY < (box.upY+btnSize)){ click = true return scrollUp() } if (mouseY > box.downY && mouseY < (box.downY+btnSize)){ click = true return scrollDn() } if (mouseY < box.downY && mouseY > (dragTop + barSize)){ click = true return scrollDn() } if (mouseY > (box.upY + btnSize) && mouseY < dragTop){ click = true return scrollUp() } if (mouseY > dragTop && mouseY < (dragTop + barSize)){ clickDrag = true return false } } }}4.打字效果
var it=0function initialize(){mytext=typing.innerTextvar myheight=typing.offsetHeighttyping.innerText=''document.all.typing.style.height=myheightdocument.all.typing.style.visibility="visible"typeit()}function typeit(){typing.insertAdjacentText("beforeEnd",mytext.charAt(it))if (it<mytext.length-1){it++setTimeout("typeit()",100)}elsereturn}if (document.all)document.body.onload=initialize
这就是打字的效果,感觉很不错!!
可以断行吗?
当然..用br段行标签即可。
2005年08月11日 02点08分 7
level 1
.....有好多超好的代码.....可惜都超长............郁闷
2005年08月11日 02点08分 8
level 2
代码太长了吧……偶米个人空间咧……
2005年08月11日 02点08分 9
level 1
.....静态的行么?偶有一个...........100M免费的
2005年08月11日 02点08分 10
level 2
是米办法传网页啦!而且网页也不大会做诶……
2005年08月11日 02点08分 11
level 2
有中文的吗……
2005年08月11日 02点08分 13
level 1
有.....不过.....静态的.......不支持留言本......所以我米成功过........
2005年08月11日 02点08分 14
level 2
到底怎么用啊……
2005年08月11日 02点08分 15
level 0
FTP上传........恩.....有教程..........很简单的........
2005年08月11日 02点08分 16
level 2
那哪里可以下……偶挖到的都是英文呢……
2005年08月11日 02点08分 17
level 0
..........我建议注册黑金的.......不知是动的还是静的......在线管理
2005年08月11日 02点08分 18
level 2
偶问呢……
2005年08月11日 02点08分 19
level 2
哦……
2005年08月11日 03点08分 21
level 0
http://www0.91i.net/HA_LeapFTP%202.7.5.610_yfy_final.rar试试
2005年08月11日 03点08分 22
1 2 3 4 5 尾页