一 些很实用且必用的小脚本代码:

脚本1:进入主页以后自动播放声音
<embed src="pnm://10.13.31.90/~kayvin/mihunji.rm" hidden=true autostart=true loop=true>

脚本2:进入主页后自动最大话,省的去在自己单击了
<script>
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
</script>

脚本3:显示现在时间的脚本
<script language=vbscript>document.write now</script>

脚本4:显示最后修改时间的脚本
<script>document.write(document.lastModified)</script>

脚本5:设为首页,加为收藏,加入频道,启动outlook发信
<a style="cursor:hand" 
onclick="this.style.behavior="url(#default#homepage)";
this.setHomePage(http://10.13.31.90/~kayvin/);">">设为首页</a>

<a style="cursor:hand"
onclick="window.external.AddFavorite(location.href,document.title);">加入收藏</a>

<a href=javascript:window.external.addChannel("typhoon.cdf")>加入频道</a>

<a href="mailtkayvin@sohu.com">与我联系</a>

脚本6:状态栏动态显示现在时间
<script>
function see(){
window.setTimeout("see()",1000);
today = new Date();
self.status = today.toString();
}
</script>
<body onload=see()>

脚本7:关闭窗口的脚本
<a href=javascript:close()>[关闭窗口]</a>

脚本8:按下F12键,直接返回首页
<script>function look(){
if(event.keyCode==123){document.location.href=http://10.13.31.90/~kayvin/}
}
if(document.onkeydown==null)
{document.onkeydown=look}
</script>

脚本9:后退,刷新,前进
<input type=button value=后退 onclick=history.go(-1)>

<input type=button value=刷新 onclick=history.go(-0)>

<input type=button value=前进 onclick=history.go(+1)>

脚本10:设定时间弹出窗口,4000=4秒,当然你可以自定义
<script>function l()
{
window.open(" 10.13.31.90/~kayvin/ ","name","width=500,height=150,border=0")
}
setTimeout("l()",4000)

</script>

二 鼠标旁边的提示信息,类似与163登录后的页面提示效果

<a href="#" title="这是提示">tip</a>
<script Language="JavaScript">
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;
//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;
document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");

function showPopupText(){
var o=event.srcElement;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
if(o.dypop!=sPop) {
sPop=o.dypop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}
else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}
function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}
function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}
else {
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}
function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
document.onmouseover=showPopupText;
</script>

三 如果文字过长,则将过长的部分变成省略号显示

<DIV STYLE="width: 120px; height: 50px; border: 1px solid blue;
overflow: hidden; text-overflow:ellipsis">
<NOBR>就是比如有一行文字,很长,表格内一行显示不下.</NOBR>
</DIV>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



四 滚动的图片

<script language="javascript">
imgArr=new Array()
imgArr[0]="<a href=# onmouseMove='javascript:outHover=true' onMouseover='javascript:outHover=true' onMouseout='javascript:outHover=false;mvStart()'><img src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif border=0></a>"
imgArr[1]="<a href=# onmouseMove='javascript:outHover=true' onMouseover='javascript:outHover=true' onMouseout='javascript:outHover=false;mvStart()'><img src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif border=0></a>"
imgArr[2]="<a href=# onmouseMove='javascript:outHover=true' onMouseover='javascript:outHover=true' onMouseout='javascript:outHover=false;mvStart()'><img src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif border=0></a>"
imgArr[3]="<a href=# onmouseMove='javascript:outHover=true' onMouseover='javascript:outHover=true' onMouseout='javascript:outHover=false;mvStart()'><img src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif border=0></a>"
imgArr[4]="<a href=# onmouseMove='javascript:outHover=true' onMouseover='javascript:outHover=true' onMouseout='javascript:outHover=false;mvStart()'><img src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif border=0></a>"
var moveStep=4        //步长,单位:pixel
var moveRelax=100    //移动时间间隔,单位:ms
ns4=(document.layers)?true:false
var displayImgAmount=4    //视区窗口可显示个数
var divWidth=220    //每块图片占位宽
var divHeight=145    //每块图片占位高
var startDnum=0
var nextDnum=startDnum+displayImgAmount
var timeID
var outHover=false
var startDivClipLeft
var nextDivClipRight
function initDivPlace(){
if (ns4){
for (i=0;i<displayImgAmount;i++){
eval("document.divOuter.document.divAds"+i+".left="+divWidth*i)
}
for (i=displayImgAmount;i<imgArr.length;i++){
eval("document.divOuter.document.divAds"+i+".left="+divWidth*displayImgAmount)
}
}else{
for (i=0;i<displayImgAmount;i++){
eval("document.all.divAds"+i+".style.left="+divWidth*i)
}
for (i=displayImgAmount;i<imgArr.length;i++){
eval("document.all.divAds"+i+".style.left="+divWidth*displayImgAmount)
}
}
}
function mvStart(){
timeID=setTimeout(moveLeftDiv,moveRelax)
}
function mvStop(){
clearTimeout(timeID)
}
function moveLeftDiv(){
if (ns4){
for (i=0;i<=displayImgAmount;i++){
eval("document.divOuter.document.divAds"+parseInt((startDnum+i)%imgArr.length)+".left=document.divOuter.document.divAds"+parseInt((startDnum+i)%imgArr.length)+".left-moveStep")
}
startDivClipLeft=parseInt(eval("document.divOuter.document.divAds"+startDnum+".clip.left"))
nextDivClipRight=parseInt(eval("document.divOuter.document.divAds"+nextDnum+".clip.right"))
if (startDivClipLeft+moveStep>divWidth){
eval("document.divOuter.document.divAds"+nextDnum+".clip.right="+divWidth)
eval("document.divOuter.document.divAds"+startDnum+".left="+divWidth*displayImgAmount)
eval("document.divOuter.document.divAds"+parseInt((nextDnum+1)%imgArr.length)+".left=document.divOuter.document.divAds"+nextDnum+".left+"+divWidth)
eval("document.divOuter.document.divAds"+parseInt((nextDnum+1)%imgArr.length)+".clip.left=0")
startDnum=(++startDnum)%imgArr.length
nextDnum=(startDnum+displayImgAmount)%imgArr.length
startDivClipLeft=moveStep-(divWidth-startDivClipLeft)
nextDivClipRight=moveStep-(divWidth-nextDivClipRight)
}else{
eval("document.divOuter.document.divAds"+nextDnum+".clip.left=0")
startDivClipLeft+=moveStep
nextDivClipRight+=moveStep
}
eval("document.divOuter.document.divAds"+startDnum+".clip.left="+startDivClipLeft)
eval("document.divOuter.document.divAds"+nextDnum+".clip.right="+nextDivClipRight)
}else{
for (i=0;i<=displayImgAmount;i++){
eval("document.all.divAds"+parseInt((startDnum+i)%imgArr.length)+".style.left=document.all.divAds"+parseInt((startDnum+i)%imgArr.length)+".style.pixelLeft-moveStep")
}
startDivClipLeft=parseInt(eval("document.all.divAds"+startDnum+".currentStyle.clipLeft"))
nextDivClipRight=parseInt(eval("document.all.divAds"+nextDnum+".currentStyle.clipRight"))
if (startDivClipLeft+moveStep>divWidth){
eval("document.all.divAds"+nextDnum+".style.clip='rect(0,"+divWidth+","+divHeight+",0"+")'")
eval("document.all.divAds"+startDnum+".style.left="+divWidth*displayImgAmount)
eval("document.all.divAds"+parseInt((nextDnum+1)%imgArr.length)+".style.left=document.all.divAds"+nextDnum+".style.pixelLeft+"+divWidth)
startDnum=(++startDnum)%imgArr.length
nextDnum=(startDnum+displayImgAmount)%imgArr.length
startDivClipLeft=moveStep-(divWidth-startDivClipLeft)
nextDivClipRight=moveStep-(divWidth-nextDivClipRight)
}else{
startDivClipLeft+=moveStep
nextDivClipRight+=moveStep
}
eval("document.all.divAds"+startDnum+".style.clip='rect(0,"+divWidth+","+divHeight+","+startDivClipLeft+")'")
eval("document.all.divAds"+nextDnum+".style.clip='rect(0,"+nextDivClipRight+","+divHeight+",0)'")
}
if (outHover){
mvStop()
}else{
mvStart()
}
}
function writeDivs(){
if (ns4){
document.write("<ilayer name=divOuter width=750 height="+divHeight+">")
for (i=0;i<imgArr.length;i++){
document.write("<layer name=divAds"+i+">")
document.write(imgArr[i]+" ")
document.write("</layer>")
}
document.write("</ilayer>")
document.close()
for (i=displayImgAmount;i<imgArr.length;i++){
eval("document.divOuter.document.divAds"+i+".clip.right=0")
}
}else{
document.write("<div id=divOuter style='position:relative' width=750 height="+divHeight+">")
for (i=0;i<imgArr.length;i++){
document.write("<div id=divAds"+i+" style='position:absolute;clip:rect(0,"+divWidth+","+divHeight+",0)'>")
document.write(imgArr[i]+" ")
document.write("</div>")
}
document.write("</div>")
for (i=displayImgAmount;i<imgArr.length;i++){
eval("document.all.divAds"+i+".style.clip='rect(0,0,"+divHeight+",0)'")
}
}
}
</script>
<BODY onload=javascript:mvStart()>
<SCRIPT language=javascript>writeDivs();initDivPlace();</SCRIPT> 


 

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]





五 类似与QQ的好友/黑名单之类的树型菜单_极品

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<script>
if (!document.getElementById)
document.getElementById = function() { return null; }
function initializeMenu(menuId, actuatorId) {
var menu = document.getElementById(menuId);
var actuator = document.getElementById(actuatorId);
if (menu == null || actuator == null) return;
//if (window.opera) return; // I'm too tired
actuator.parentNode.style.backgroundImage = "url(/images/plus.gif)";
actuator.onclick = function() {
var display = menu.style.display;
this.parentNode.style.backgroundImage =
(display == "block") ? "url(/images/plus.gif)" : "url(/images/minus.gif)";
menu.style.display = (display == "block") ? "none" : "block";
return false;
}
}
window.onload = function() {
initializeMenu("productsMenu", "productsActuator");
initializeMenu("newPhonesMenu", "newPhonesActuator");
initializeMenu("compareMenu", "compareActuator");
}
</script>
<style>
body {
font-family: verdana, helvetica, arial, sans-serif;
}
#mainMenu {
background-color: #EEE;
border: 1px solid #CCC;
color: #000;
width: 203px;
}
#menuList {
margin: 0px;
padding: 10px 0px 10px 15px;
}
li.menubar {
background: url(/images/plus.gif) no-repeat 0em 0.3em;
font-size: 12px;
line-height: 1.5em;
list-style: none outside;
}
.menu, .submenu {
display: none;
margin-left: 15px;
padding: 0px;
}
.menu li, .submenu li {
background: url(/images/square.gif) no-repeat 0em 0.3em;
list-style: none outside;
}
a.actuator {
background-color: transparent;
color: #000;
font-size: 12px;
padding-left: 15px;
text-decoration: none;
}
a.actuator:hover {
text-decoration: underline;
}
.menu li a, .submenu li a {
background-color: transparent;
color: #000;
font-size: 12px;
padding-left: 15px;
text-decoration: none;
}
.menu li a:hover, submenu li a:hover {
/*border-bottom: 1px dashed #000;*/
text-decoration: underline;
}
span.key {
text-decoration: underline;
}
</style>
</head>
<body>
<div id="mainMenu">
<ul id="menuList">
<li class="menubar">
<a href="#" id="productsActuator" class="actuator">图秀地带收藏夹</a>
<ul id="productsMenu" class="menu">
<li>
<a href="#" id="newPhonesActuator" class="actuator">我的好友</a>
<ul id="newPhonesMenu" class="submenu">
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li>
</ul>
</li>
<li>
<a href="#" id="compareActuator" class="actuator">陌生人</a>
<ul id="compareMenu" class="submenu">
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">张三[10000001]</a></li>
<li><a href="http://mc.mapabc.com/mapcard/card.jsp?pp=1000000001">李四[10000002]</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</body>
</BODY>
</HTML>


 

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



六 漂亮的脚本日历

<Script LANGUAGE="JavaScript">
var months = new Array("一", "二", "三","四", "五", "六", "七", "八", "九","十", "十一", "十二");
var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31);
var days = new Array("日","一", "二", "三","四", "五", "六");
var classTemp;
var today=new getToday();
var year=today.year;
var month=today.month;
var newCal;
function getDays(month, year) {
if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28;
else return daysInMonth[month];
}
function getToday() {
this.now = new Date();
this.year = this.now.getFullYear();
this.month = this.now.getMonth();
this.day = this.now.getDate();
}
function Calendar() {
newCal = new Date(year,month,1);
today = new getToday();
var day = -1;
var startDay = newCal.getDay();
var endDay=getDays(newCal.getMonth(), newCal.getFullYear());
var daily = 0;
if ((today.year == newCal.getFullYear()) &&(today.month == newCal.getMonth()))
{
day = today.day;
}
var caltable = document.all.caltable.tBodies.calendar;
var intDaysInMonth =getDays(newCal.getMonth(), newCal.getFullYear());
for (var intWeek = 0; intWeek < caltable.rows.length;intWeek++)
for (var intDay = 0;intDay < caltable.rows[intWeek].cells.length;intDay++)
{
var cell = caltable.rows[intWeek].cells[intDay];
var montemp=(newCal.getMonth()+1)<10?("0"+(newCal.getMonth()+1)):(newCal.getMonth()+1);
if ((intDay == startDay) && (0 == daily)){ daily = 1;}
var daytemp=daily<10?("0"+daily):(daily);
var d="<"+newCal.getFullYear()+"-"+montemp+"-"+daytemp+">";
if(day==daily) cell.className="DayNow";
else if(intDay==6) cell.className = "DaySat";
else if (intDay==0) cell.className ="DaySun";
else cell.className="Day";
if ((daily > 0) && (daily <= intDaysInMonth))
{
cell.innerText = daily;
daily++;
} else
{
cell.className="CalendarTD";
cell.innerText = "";
}
}
document.all.year.value=year;
document.all.month.value=month+1;
}
function subMonth()
{
if ((month-1)<0)
{
month=11;
year=year-1;
} else
{
month=month-1;
}
Calendar();
}
function addMonth()
{
if((month+1)>11)
{
month=0;
year=year+1;
} else
{
month=month+1;
}
Calendar();
}
function setDate()
{
if (document.all.month.value<1||document.all.month.value>12)
{
alert("月的有效范围在1-12之间!");
return;
}
year=Math.ceil(document.all.year.value);
month=Math.ceil(document.all.month.value-1);
Calendar();
}
</Script>
<Script>
function buttonOver()
{
var obj = window.event.srcElement;
obj.runtimeStyle.cssText = "background-color:#FFFFFF";
// obj.className="Hover";
}
function buttonOut()
{
var obj = window.event.srcElement;
window.setTimeout(function(){obj.runtimeStyle.cssText = "";},300);
}
</Script>
<Style>
Input {font-family: verdana;font-size: 9pt;text-decoration: none;background-color: #FFFFFF;height: 20px;border: 1px solid #666666;color:#000000;}
.Calendar {font-family: verdana;text-decoration: none;width: 170;background-color: #C0D0E8;font-size: 9pt;border:0px dotted #1C6FA5;}
.CalendarTD {font-family: verdana;font-size: 7pt;color: #000000;background-color:#f6f6f6;height: 20px;width:11%;text-align: center;}
.Title {font-family: verdana;font-size: 11pt;font-weight: normal;height: 24px;text-align: center;color: #333333;text-decoration: none;background-color: #A4B9D7;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-bottom-style:1px;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;}
.Day {font-family: verdana;font-size: 7pt;color:#243F65;background-color: #E5E9F2;height: 20px;width:11%;text-align: center;}
.DaySat {font-family: verdana;font-size: 7pt;color:#FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}
.DaySun {font-family: verdana;font-size: 7pt;color: #FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}
.DayNow {font-family: verdana;font-size: 7pt;font-weight: bold;color: #000000;background-color: #FFFFFF;height: 20px;text-align: center;}
.DayTitle {font-family: verdana;font-size: 9pt;color: #000000;background-color: #C0D0E8;height: 20px;width:11%;text-align: center;}
.DaySatTitle {font-family: verdana;font-size: 9pt;color:#FF0000;text-decoration: none;background-color:#C0D0E8;text-align: center;height: 20px;width: 12%;}
.DaySunTitle {font-family: verdana;font-size: 9pt;color: #FF0000;text-decoration: none;background-color: #C0D0E8;text-align: center;height: 20px;width: 12%;}
.DayButton {font-family: Webdings;font-size: 9pt;font-weight: bold;color: #243F65;cursor:hand;text-decoration: none;}
</Style>
<table border="0" cellpadding="0" cellspacing="1" class="Calendar" id="caltable">
<thead>
<tr align="center" valign="middle">
<td colspan="7" class="Title">
<a href="javaScript:subMonth();" title="上一月" Class="DayButton">3</a> <input name="year" type="text" size="4" maxlength="4" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"  onpaste="this.value=this.value.replace(/[^0-9]/g,'')"> 年 <input name="month" type="text" size="1" maxlength="2" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"  onpaste="this.value=this.value.replace(/[^0-9]/g,'')"> 月 <a href="JavaScript:addMonth();" title="下一月" Class="DayButton">4</a>
</td>
</tr>
<tr align="center" valign="middle">
<Script LANGUAGE="JavaScript">
document.write("<TD class=DaySunTitle id=diary >" + days[0] + "</TD>");
for (var intLoop = 1; intLoop < days.length-1;intLoop++)
document.write("<TD class=DayTitle id=diary>" + days[intLoop] + "</TD>");
document.write("<TD class=DaySatTitle id=diary>" + days[intLoop] + "</TD>");
</Script>
</TR>
</thead>
<TBODY border=1 cellspacing="0" cellpadding="0" ID="calendar" ALIGN=CENTER ONCLICK="getDiary()">
<Script LANGUAGE="JavaScript">
for (var intWeeks = 0; intWeeks < 6; intWeeks++)
{
document.write("<TR style='cursor:hand'>");
for (var intDays = 0; intDays < days.length;intDays++) document.write("<TD class=CalendarTD onMouseover='buttonOver();' onMouseOut='buttonOut();'></TD>");
document.write("</TR>");
}
</Script>
</TBODY>
</TABLE>
<Script  LANGUAGE="JavaScript">
Calendar();
</Script>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



七 进入,退出页面的各种效果!

网页特效、JavaScript经典效果_sed HTML代码
进入页面<meta http-equiv="Page-Enter" content="revealTrans(duration=x, transition=y)">
推出页面<meta http-equiv="Page-Exit" content="revealTrans(duration=x, transition=y)">
这个是页面被载入和调出时的一些特效。duration表示特效的持续时间,以秒为单位。transition表示使用哪种特效,取值为1-23:
  0 矩形缩小
  1 矩形扩大
  2 圆形缩小
  3 圆形扩大
  4 下到上刷新
  5 上到下刷新
  6 左到右刷新
  7 右到左刷新
  8 竖百叶窗
  9 横百叶窗
  10 错位横百叶窗
  11 错位竖百叶窗
  12 点扩散
  13 左右到中间刷新
  14 中间到左右刷新
  15 中间到上下
  16 上下到中间
  17 右下到左上
  18 右上到左下
  19 左上到右下
  20 左下到右上
  21 横条
  22 竖条
  23 以上22种随机选择一种



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



八 很酷的效果,表格被选中背景会变颜色

网页特效、JavaScript经典效果_sed HTML代码
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<html>
<head>
</head>
<title>Mapabc地图无限</title>
<script language="JavaScript">
var searchResult=new Array();//鼠标滑过时显示背景色
function borderize(what,color,color2)
{
what.style.borderColor=color
what.style.backgroundColor=color2
}
function borderize_on(e){
if (document.all)
source3=event.srcElement
else if (document.getElementById)
source3=e.target
if (source3.className=="zuo22"){
borderize(source3,"#999999","#F6F6F8")
}
else{
while(source3.tagName!="TABLE"){
source3=document.getElementById? source3.parentNode : source3.parentElement
if (source3.className=="zuo22")
borderize(source3,"#999999","#F6F6F8")
}
}
}
function borderize_off(e){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="zuo22")
borderize(source4,"white","white")
else{
while(source4.tagName!="TABLE"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="zuo22")
borderize(source4,"white","white")
}
}
}
</script>
<body >
<table width="96%" border="0" onMouseOver="borderize_on(event)" onMouseOut="borderize_off(event)" class="zuo22" onclick="javascript:clickfun('123')">
<TR>
<TD>把鼠标移过来</TD>
<TD>把鼠标移过来</TD>
</TR>
<TR>
<TD>把鼠标移过来</TD>
<TD>把鼠标移过来</TD>
</TR>
<TR>
<TD>把鼠标移过来</TD>
<TD>把鼠标移过来</TD>
</TR>
<TR>
<TD>把鼠标移过来</TD>
<TD>把鼠标移过来</TD>
</TR>
</table>
</body>
</html>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



九 DIV_圆边圆角的实现:

网页特效、JavaScript经典效果_sed HTML代码
<html xmlns:v>
<head>
<style>
v\:*{behavior: url(#default#VML);}
</style>
</head>
<body>
<v:roundRect style="position:absolute;left:20px;top:50px;width:200px;height:140px;" FillColor="#AAEAFA" Filled="T" />
</body>


[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



十 跳动的菜单(类似FLASH效果,酷):

网页特效、JavaScript经典效果_sed HTML代码
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>模仿as效果的导航菜单</title>
<style type="text/css">
<!--
a:link,a:visited    { text-decoration: none; color: #666666 }
a:hover            { text-decoration: underline }
#hor1 {
position:absolute;
left:320px;
top:20px;
width:220px;
height:20px;
z-index:1;
background-color: #999900;
}
#hor2 {
position:absolute;
left:320px;
top:40px;
width:220px;
height:20px;
z-index:2;
background-color: #FFCC00;
}
#hor3 {
position:absolute;
left:320px;
top:60px;
width:220px;
height:20px;
z-index:3;
background-color: #99CC00;
}
#board1 {
position:absolute;
left:320px;
top:40px;
width:220px;
height:120px;
z-index:-100;
background-color: #333333;
visibility: hidden;
}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
}
body {
background-color: #666666;
}
#board2 {
position:absolute;
left:320px;
top:60px;
width:220px;
height:120px;
z-index:-90;
background-color: #333333;
visibility: hidden;
}
#board3 {
position:absolute;
width:220px;
height:120px;
z-index:-80;
left: 320px;
top: 80px;
background-color: #333333;
visibility: hidden;
}
#hor4 {
position:absolute;
left:320px;
top:80px;
width:220px;
height:20px;
z-index:4;
background-color: #99CCCC;
}
#board4 {
position:absolute;
left:320px;
top:100px;
width:220px;
height:120px;
z-index:-70;
background-color: #333333;
visibility: hidden;
}
-->
</style>
<script type="text/javascript">
lastNo=0
function re(menu_no){
if(lastNo!=menu_no){
cur=menu_no+1
lastNo=menu_no
rest()
}else{
cur=100
}
document.getElementById("board"+menu_no).style.visibility="visible"
}
function rest(){
for(i=1;i<=4;i++){
document.getElementById("hor"+i).style.top=20*i;
document.getElementById("board"+i).style.visibility="hidden"
}
menu_num=4;
act=1
height=120+20
speed=0;
posY=0;
}
function huke(){
if(act==1&&cur<100){
speed=(height-posY)*0.69+speed*0.6
posY+=speed
for(i=cur;i<=menu_num;i++){
document.getElementById("hor"+i).style.top=posY+(i-2)*20
}
if(Math.abs(height-posY)<0.5){
for(i=cur;i<=menu_num;i++){
document.getElementById("hor"+i).style.top=height+(i-2)*20
}
act=0
}
setTimeout("huke()",50)
}
}
</script>
</head>
<body>
<div id="hor1" onclick="re(1);huke()">News</div>
<div id="hor2" onclick="re(2);huke()">Populor</div>
<div id="hor3" onclick="re(3);huke()">Sports</div>
<div id="hor4" onclick="re(4);huke()">Woman</div>
<div id="board1">1.由AS而想起Javascript<br />2.用Jscript写ASP有没有先天性的不足?<br />3.没有了。</div>
<div id="board2">1.xhtml+css真的来了吗?<br />2.Flash取代传统网站<br />3.Flash何时才能连接数据库?</div>
<div id="board3">1.程序员与小姐的10个相同。<br />2.中国的程序员与中国的足球?</div>
<div id="board4">1.二十一世纪最缺的是什么?人才<br />
<a href="http://www.gamvan.com" target="_blank">http://www.gamvan.com</a>
<a href="http://www.gamvan.com" target="_blank">http://www.gamvan.com</a></div>
</body>
</html>


[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



十一 客户端静态页面玩分页:

网页特效、JavaScript经典效果_sed HTML代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>
* {
font-size:10.2pt;
font-family:tahoma;
line-height:150%;
}
.divContent
{
border:1px solid red;
background-color:#FFD2D3;
width:500px;
word-break:break-all;
margin:10px 0px 10px;
padding:10px;
}
</style>
</HEAD>
<BODY>
header
<div id="divPagenation"></div>
<div id="divContent"></div>
footer
<SCRIPT LANGUAGE="JavaScript">
<!--
s="<p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p>";
function DHTMLpagenation(content) { with (this)
{
// client static html file pagenation
this.content=content;
this.contentLength=content.length;
this.pageSizeCount;
this.perpageLength=100; //default perpage byte length.
this.currentPage=1;
//this.regularExp=/.+[\?\&]{1}page=(\d+)/;
this.regularExp=/\d+/;
this.divDisplayContent;
this.contentStyle=null;
this.strDisplayContent="";
this.divDisplayPagenation;
this.strDisplayPagenation="";
arguments.length==2?perpageLength=arguments[1]:'';
try {
divExecuteTime=document.createElement("DIV");
document.body.appendChild(divExecuteTime);
}
catch(e)
{
}
if(document.getElementById("divContent"))
{
divDisplayContent=document.getElementById("divContent");
}
else
{
try
{
divDisplayContent=document.createElement("DIV");
divDisplayContent.id="divContent";
document.body.appendChild(divDisplayContent);
}
catch(e)
{
return false;
}
}
if(document.getElementById("divPagenation"))
{
divDisplayPagenation=document.getElementById("divPagenation");
}
else
{
try
{
divDisplayPagenation=document.createElement("DIV");
divDisplayPagenation.id="divPagenation";
document.body.appendChild(divDisplayPagenation);
}
catch(e)
{
return false;
}
}
DHTMLpagenation.initialize();
return this;
}};
DHTMLpagenation.initialize=function() { with (this)
{
divDisplayContent.className=contentStyle!=null?contentStyle:"divContent";
if(contentLength<=perpageLength)
{
strDisplayContent=content;
divDisplayContent.innerHTML=strDisplayContent;
return null;
}
pageSizeCount=Math.ceil((contentLength/perpageLength));
DHTMLpagenation.goto(currentPage);
DHTMLpagenation.displayContent();
}};
DHTMLpagenation.displayPage=function() { with (this)
{
strDisplayPagenation="分页:";
if(currentPage&&currentPage!=1)
strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.previous()">上一页</a>&nbsp;&nbsp;';
else
strDisplayPagenation+="上一页&nbsp;&nbsp;";
for(var i=1;i<=pageSizeCount;i++)
{
if(i!=currentPage)
strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.goto('+i+');">'+i+'</a>&nbsp;&nbsp;';
else
strDisplayPagenation+=i+"&nbsp;&nbsp;";
}
if(currentPage&&currentPage!=pageSizeCount)
strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.next()">下一页</a>&nbsp;&nbsp;';
else
strDisplayPagenation+="下一页&nbsp;&nbsp;";
strDisplayPagenation+="共 " + pageSizeCount + " 页,每页" + perpageLength + " 字符,调整字符数:<input type='text' value='"+perpageLength+"' id='ctlPerpageLength'><input type='button' value='确定' onclick='DHTMLpagenation.change(document.getElementById(\"ctlPerpageLength\").value);'>";
divDisplayPagenation.innerHTML=strDisplayPagenation;
}};
DHTMLpagenation.previous=function() { with(this)
{
DHTMLpagenation.goto(currentPage-1);
}};
DHTMLpagenation.next=function() { with(this)
{
DHTMLpagenation.goto(currentPage+1);
}};
DHTMLpagenation.goto=function(iCurrentPage) { with (this)
{
startime=new Date();
if(regularExp.test(iCurrentPage))
{
currentPage=iCurrentPage;
strDisplayContent=content.substr((currentPage-1)*perpageLength,perpageLength);
}
else
{
alert("page parameter error!");
}
DHTMLpagenation.displayPage();
DHTMLpagenation.displayContent();
}};
DHTMLpagenation.displayContent=function() { with (this)
{
divDisplayContent.innerHTML=strDisplayContent;
}};
DHTMLpagenation.change=function(iPerpageLength) { with(this)
{
if(regularExp.test(iPerpageLength))
{
DHTMLpagenation.perpageLength=iPerpageLength;
DHTMLpagenation.currentPage=1;
DHTMLpagenation.initialize();
}
else
{
alert("请输入数字");
}
}};
// method
// DHTMLpagenation(strContent,perpageLength)
DHTMLpagenation(s,100);
//-->
</SCRIPT>
</BODY>
</HTML>


[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



十二 运行代码的代码:

网页特效、JavaScript经典效果_sed HTML代码
<script>
function Preview()
{
var TestWin=open('');
TestWin.document.write(code.value);
}
</script>
<textarea id=code cols=60 rows=15>在这里输入代码</textarea>
<br>
<button onclick=Preview() >运行</button>



13、Yi人社区随机变换的广告图片

网页特效、JavaScript经典效果_sed HTML代码
<SCRIPT language=JavaScript>
<!-- // BannerAD
var bannerAD=new Array();
var bannerADlink=new Array();
var adNum=0;
bannerAD[0]="http://www.94er.cn/photo/top1.gif";
bannerADlink[0]="#";
bannerAD[1]="http://www.94er.cn/photo/top2.gif";
bannerADlink[1]="#";
bannerAD[2]="http://www.94er.cn/photo/top3.gif";
bannerADlink[2]="#";
bannerAD[3]="http://www.94er.cn/photo/top4.gif";
bannerADlink[3]="#";
var preloadedimages=new Array();
for (i=1;i<bannerAD.length;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=bannerAD[i];
}
function setTransition(){
if (document.all){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bannerADrotator.filters.revealTrans.apply();
}
}
function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()
}
function nextAd(){
if(adNum<bannerAD.length-1)adNum++ ;
else adNum=0;
setTransition();
document.images.bannerADrotator.src=bannerAD[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 5000);
}
function jump2url(){
jumpUrl=bannerADlink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
}
function displayStatusMsg() {
status=bannerADlink[adNum];
document.returnValue = true;
}
//-->
</SCRIPT>
<td align="center" valign="top" bgcolor="#FFFFFF"><A onmouseover="displayStatusMsg();return document.returnValue"
href="javascript:jump2url()"><IMG
style="FILTER: revealTrans(duration=2,transition=20)" height=142
src="" width=573 border=0 name=bannerADrotator></A><SCRIPT language=JavaScript>nextAd()</SCRIPT></td>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


14、凹陷文字

网页特效、JavaScript经典效果_sed HTML代码
<div style="width:300px;padding:20px;overflow:hidden;word-wrap:break-word;word-break:break:all; font-size:12px; line-height:18px; background-color:#eeeeee;">
<font disabled>
小夜BLOG:<a href="http://www.wanghaibin.com" target="_blank">xoyoer</a>.94er.cn<br>
这个效果很漂亮吧?<br>
你不想试试吗?<br>
<a href="http://<a href="http://www.wanghaibin.com" target="_blank">xoyoer</a>.94er.cn/">www.lenvo.cn</a></font>
</div>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


15、漂亮的仿flash菜单

网页特效、JavaScript经典效果_sed HTML代码
<style>
/* 先把这个 xmenu 的样式放到css里 */
.xmenu td{font-size:12px;font-family:verdana,arial;font-weight:bolder;color:#ffffff;border:1px solid #336699;background:#336699;filter:blendtrans(duration=0.5);cursor:hand;text-align:center;}
</style>
<script>
/*
http://lexrus.blueidea.com
这是把事件动作绑定到菜单上的函数
*/
function attachXMenu(objid){
var tds=objid.getElementsByTagName('td');
for(var i=0;i<tds.length;i++){
with(tds[i]){
onmouseover=function(){
with(this){
filters[0].apply();
style.background='#66CCFF'; //这是鼠标移上去时的背景颜色
style.border='1px solid #ffffff'; //边框
style.color='black'; //文字颜色
filters[0].play();
}
}
onmouseout=function(){
with(this){
filters[0].apply();
style.background='#336699'; //这是鼠标离开时的背景颜色
style.border='1px solid #336699'; //边框
style.color='#ffffff'; //文字颜色
filters[0].play();
}
}
}
}
}
</script>
<!--菜单从这里开始, 注意要把class设置成和css里相同的, 还要为它设一个id-->
<table class="xmenu" id="xmenu0" width="500" cellpadding="1" cellspacing="4" border="0" bgcolor="#336699" align="center">
<tr>
<td><a href="http://<a href="http://www.wanghaibin.com" target="_blank">xoyoer</a>.94er.cn/"><a href="http://www.wanghaibin.com" target="_blank">xoyoer</a>.94er.cn</a></td>
<td>小</td>
<td>夜</td>
<td>的</td>
<td>博</td>
<td>客</td>
</tr>
</table>
<script>attachXMenu(xmenu0); //在上面这个table结束的地方执行事件动作的绑定, 这里的这个xmenu0就是那个table的id</script>
<br><br><br><br>
<!--下面这个是竖排的-->
<table class="xmenu" id="xmenu1" width="100" cellpadding="1" cellspacing="4" border="0" bgcolor="#336699" align="center">
<tr><td>My</td></tr>
<tr><td>Name</td></tr>
<tr><td>Is</td></tr>
<tr><td><a href="http://www.wanghaibin.com" target="_blank">xoyoer</a></td></tr>
</table>
<script>attachXMenu(xmenu1);</script>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


16、自定义容器和字体大小

网页特效、JavaScript经典效果_sed HTML代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Home</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="The Man in Blue" />
<meta name="robots" content="all" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<style type="text/css" media="all">
body
{
margin: 1em;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
body *
{
margin: 0;
}
#content
{
padding: 1em;
background-color: #BBDDFF;
background-image: url(column_bg.gif);
background-repeat: repeat-y;
background-position: 30em 0;
text-align: left;
}
#content p
{
margin-bottom: 1em;
}
#footer
{
margin-top: 1em;
padding: 1em;
background-color: #0066CC;
text-align: left;
}
#footer a
{
color: #FFFFFF;
}
#header
{
margin-bottom: 1em;
padding: 1em;
background-color: #0066CC;
color: #FFFFFF;
text-align: left;
}
#leftContent
{
padding-right: 10em;
}
#options
{
margin-bottom: 1em;
text-align: right;
}
#options a
{
color: #000000;
}
#rightContent
{
float: right;
width: 8em;
}
#widthContainer
{
font-size: 0.8em;
width: 40em;
margin: auto;
}
.clearer
{
clear: both;
}
</style>
<script type="text/javascript">
<!--
function scaleWidth()
{
var optimalLineLength = "35em";
var extraAccounting = "12em";
var minimumTextHeight = "10px";
var windowWidth = document.body.clientWidth;
var optimalSize = windowWidth / (parseInt(optimalLineLength) + parseInt(extraAccounting));
if (optimalSize >= parseInt(minimumTextHeight))
{
document.body.style.fontSize = optimalSize + "px";
}
else
{
document.body.style.fontSize = parseInt(minimumTextHeight) + "px";
}
return true;
}
function textSize(size)
{
var theContainer = document.getElementById("widthContainer");
var increment = 0.1
var currentSize = parseFloat(document.getElementById("widthContainer").style.fontSize);
if (!currentSize)
{
currentSize = 0.8;
}
if (size == "smaller")
{
theContainer.style.fontSize = (currentSize - increment) + "em";
}
else
{
theContainer.style.fontSize = (currentSize + increment) + "em";
}
return true;
}
-->
</script>
</head>
<body onload="scaleWidth();" onresize="scaleWidth();">
<div id="widthContainer">
<div id="options">
<a href="#" onclick="textSize('smaller'); return false;">Text smaller</a> |
<a href="#" onclick="textSize('bigger'); return false;">Text bigger</a>
</div>
<!-- END options -->
<div id="header">
<h1>Browser-width defined font size</h1>
</div>
<!-- END header -->
<div id="content">
<div id="rightContent">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed lobortis ullamcorper augue. Praesent vel felis vitae purus ornare pretium. Nullam porta sollicitudin lectus. Integer non arcu eu neque tincidunt tincidunt. Nullam sapien arcu, ullamcorper sed, hendrerit in, rutrum in, nibh. Aliquam sed enim. Cras rhoncus ullamcorper justo. Aenean quam dolor, consectetuer sed, dapibus quis, iaculis id, diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut lacinia velit ac elit. Etiam id nulla. Phasellus at arcu ac mauris hendrerit ullamcorper. Quisque posuere sodales risus. Sed nunc nibh, egestas a, blandit eget, facilisis vel, dolor. Cras metus urna, feugiat et, iaculis quis, lacinia a, elit. Etiam enim. Maecenas viverra, est non tincidunt euismod, diam urna volutpat mi, in luctus pede ante sit amet risus.
</p>
</div>
<!-- END rightContent -->
<div id="leftContent">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed lobortis ullamcorper augue. Praesent vel felis vitae purus ornare pretium. Nullam porta sollicitudin lectus. Integer non arcu eu neque tincidunt tincidunt. Nullam sapien arcu, ullamcorper sed, hendrerit in, rutrum in, nibh. Aliquam sed enim. Cras rhoncus ullamcorper justo. Aenean quam dolor, consectetuer sed, dapibus quis, iaculis id, diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut lacinia velit ac elit. Etiam id nulla. Phasellus at arcu ac mauris hendrerit ullamcorper. Quisque posuere sodales risus. Sed nunc nibh, egestas a, blandit eget, facilisis vel, dolor. Cras metus urna, feugiat et, iaculis quis, lacinia a, elit. Etiam enim. Maecenas viverra, est non tincidunt euismod, diam urna volutpat mi, in luctus pede ante sit amet risus.
</p>
<p>
Nulla metus. Ut sodales, tortor nec sollicitudin convallis, diam diam vulputate ligula, lobortis tincidunt urna purus at urna. Pellentesque laoreet. Nulla et dolor. Praesent vestibulum quam convallis neque. Praesent sit amet odio a dui iaculis dignissim. In vel nunc a tellus vulputate pellentesque. Maecenas bibendum. Donec mi nibh, euismod in, iaculis a, eleifend et, enim. In eget lectus vitae pede nonummy elementum. Mauris accumsan, lacus ut euismod varius, odio neque egestas quam, non aliquam velit purus et purus. Vestibulum at elit nec felis suscipit pulvinar. Suspendisse at enim quis lacus mattis condimentum. Proin arcu arcu, imperdiet vitae, aliquam non, congue id, ipsum.
</p>
<p>
Aliquam eu dolor nec risus luctus faucibus. Aenean condimentum, tortor in blandit cursus, dolor magna sagittis orci, vel vehicula dolor ante at lacus. Donec vel felis in enim aliquam molestie. Sed non velit id velit pulvinar consequat. Mauris luctus. Phasellus faucibus turpis nec purus. Mauris eget ante. Donec orci enim, luctus eu, posuere at, luctus quis, pede. In in lectus. Quisque blandit, ipsum eget tincidunt scelerisque, mauris ante accumsan erat, quis congue odio erat vitae diam. Donec ut felis fermentum sem viverra pulvinar. Sed neque lorem, adipiscing ut, placerat a, ornare et, dolor. Vestibulum pretium vehicula nibh. Etiam feugiat, ligula sed pulvinar fringilla, eros arcu placerat urna, nec eleifend nisl leo sit amet urna. Suspendisse quis augue ut nibh venenatis nonummy. Nunc ut augue. In fermentum, neque eget eleifend rutrum, nulla lorem fermentum massa, eu cursus lectus mi id libero.
</p>
<p>
Nam congue ligula quis magna. Vivamus porttitor nunc non dui. Aliquam posuere dapibus tortor. Quisque facilisis, quam in semper luctus, lacus dolor gravida massa, ultrices consectetuer risus arcu nec nibh. Nulla facilisi. In a eros id eros lobortis ultrices. Vivamus sit amet neque eu magna venenatis nonummy. Pellentesque consequat. Etiam ut ipsum. Nulla consectetuer est vel quam.
</p>
<p>
Integer eu diam vitae augue sollicitudin congue. Praesent vulputate pede vel velit. Maecenas dapibus tempus lacus. Quisque lectus metus, pretium ac, mollis nec, dignissim quis, mi. Aliquam purus risus, pharetra eget, condimentum ut, blandit sit amet, leo. Suspendisse iaculis purus sed tellus. Nunc sem justo, porttitor ut, pretium eu, hendrerit eu, nunc. Vivamus sit amet neque in est venenatis faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam rhoncus, eros id ultrices facilisis, pede ligula dignissim eros, sit amet tempus risus urna sed nibh. Sed massa eros, dapibus tristique, blandit et, molestie sed, enim. Phasellus leo. Integer vestibulum volutpat enim. Duis pulvinar ligula. Pellentesque luctus velit a justo. Quisque volutpat, diam quis varius commodo, neque elit dictum tortor, quis aliquet felis risus vitae wisi. Aliquam bibendum, elit ut gravida vehicula, orci turpis auctor dolor, nec tristique tortor dolor eget ipsum.
</p>
</div>
<!-- END leftContent -->
<div class="clearer">
</div>
</div>
<!-- END content -->
<div id="footer">
<a href="http://www.themaninblue.com/writing/perspective/2003/12/22/">Back to the explanation</a>
</div>
</div>
<!-- END widthContainer -->
</body>
</html>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


17、图片新闻幻灯片效果,可控制。

网页特效、JavaScript经典效果_sed HTML代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新闻切换技术</title>
<style type="text/css">
<!--
body { text-align: center; margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;}
table,td,tr,th{font-size:12px;}
a:link {color: #000; text-decoration:none;}
a:visited {color: #83006f;text-decoration:none;}
a:hover {color: #c00; text-decoration:underline;}
a:active {color: #000;}
.focusPic{margin:0 auto; width:244px;}
.focusPic .pic{margin:0 auto; width:240px; height:180px; padding:2px 0 0;}
.focusPic .adPic{margin:0 auto 5px; width:240px; height:29px; overflow:hidden;background:url(http://tech.163.com/newimg/adpic.gif);}
.focusPic .adPic .text{float:right; padding:9px 4px 0 0; width:140px;}
.focusPic .adPic .text a{color:#1f3a87;}
.focusPic .adPic .text a:hover{color:#bc2931;}
.focusPic h2{ float:left; width:232px;padding:4px 0 3px 12px; font-size:14px; text-align:left;}
.focusPic p{float:left; width:226px;line-height:160%; margin:0; text-align:left;padding:0 0 10px 12px;}
.focusPic p img {margin:0px 0 2px;}
.focusPic .more{ margin:0 auto; width:240px; }
.focusPic .more .textNum{float:right; margin:0 8px 0 0;padding:0 0 4px;}
.focusPic .more .textNum .text{float:left; font-weight:bold; padding:7px 6px 0 0; color:#666;}
.focusPic .more .textNum .num{float:left; width:113px; height:19px;}
.focusPic .more .textNum .bg1{ background:url(http://tech.163.com/newimg/num1.gif);}
.focusPic .more .textNum .bg2{ background:url(http://tech.163.com/newimg/num2.gif);}
.focusPic .more .textNum .bg3{ background:url(http://tech.163.com/newimg/num3.gif);}
.focusPic .more .textNum .bg4{ background:url(http://tech.163.com/newimg/num4.gif);}
.focusPic .more .textNum .num ul{ float:left; width:113px;}
.focusPic .more .textNum .num li{float:left; width:28px; font-weight:bold;display:block; color:#fff; list-style-type:none; padding:6px 0 0;}
.focusPic .more .textNum .num li a{color:#fff; padding:0 5px; }
.focusPic .more .textNum .num li a:visited{color:#fff;}
.focusPic .more .textNum .num li a:hover{color:#ff0;}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
var nn;
nn=1;
setTimeout('change_img()',6000);
function change_img()
{
if(nn>4) nn=1
setTimeout('setFocus1('+nn+')',6000);
nn++;
tt=setTimeout('change_img()',6000);
}
function setFocus1(i)
{
selectLayer1(i);
}
function selectLayer1(i)
{
switch(i)
{
case 1:
document.getElementById("focusPic1").style.display="block";
document.getElementById("focusPic2").style.display="none";
document.getElementById("focusPic3").style.display="none";
document.getElementById("focusPic4").style.display="none";
document.getElementById("focusPic1nav").style.display="block";
document.getElementById("focusPic2nav").style.display="none";
document.getElementById("focusPic3nav").style.display="none";
document.getElementById("focusPic4nav").style.display="none";
break;
case 2:
document.getElementById("focusPic1").style.display="none";
document.getElementById("focusPic2").style.display="block";
document.getElementById("focusPic3").style.display="none";
document.getElementById("focusPic4").style.display="none";
document.getElementById("focusPic1nav").style.display="none";
document.getElementById("focusPic2nav").style.display="block";
document.getElementById("focusPic3nav").style.display="none";
document.getElementById("focusPic4nav").style.display="none";
break;
case 3:
document.getElementById("focusPic1").style.display="none";
document.getElementById("focusPic2").style.display="none";
document.getElementById("focusPic3").style.display="block";
document.getElementById("focusPic4").style.display="none";
document.getElementById("focusPic1nav").style.display="none";
document.getElementById("focusPic2nav").style.display="none";
document.getElementById("focusPic3nav").style.display="block";
document.getElementById("focusPic4nav").style.display="none";
break;
case 4:
document.getElementById("focusPic1").style.display="none";
document.getElementById("focusPic2").style.display="none";
document.getElementById("focusPic3").style.display="none";
document.getElementById("focusPic4").style.display="block";
document.getElementById("focusPic1nav").style.display="none";
document.getElementById("focusPic2nav").style.display="none";
document.getElementById("focusPic3nav").style.display="none";
document.getElementById("focusPic4nav").style.display="block";
break;
}
}
</script>
<div class="focusPic">
<div id="focusPic1" style="display:block ;">
<div class="pic"> <a href="http://tech.163.com/special/000915SN/soft2005.html"><img src="http://cimg.163.com/tech/2006/1/18/2006011810122068706.jpg" alt="网易学院05年软件评选结果" width="240" height="180" border="0" /></a> </div>
<h2><a href="http://tech.163.com/special/000915SN/soft2005.html">网易学院05年软件评选结果</a></h2>
<p>经过大家的热情投票和我们的辛劳整理,网易学院2005年年度软件评选结果终于出炉啦。点击进入查看……<img src="/newimg/i2.gif" alt="详细" width="3" height="5" /> <a href="http://tech.163.com/special/000915SN/soft2005.html" class="cDRed">详细</a></p>
</div>
<div id="focusPic2" style="display: none ;">
<div class="pic"> <a href="http://tech.163.com/discover/"><img src="http://cimg.163.com/tech/2006/1/17/200601171557008cee7.jpg" alt="颠覆丛林动物生存法则" width="240" height="180" border="0" /></a> </div>
<h2><a href="http://tech.163.com/discover/">颠覆丛林动物生存法则</a></h2>
<p>群居动物的这种行为颠覆了我们通常认为的,在动物世界通行的 “丛林法则”,动物不都自私,不都是弱肉强食的。<img src="/newimg/i2.gif" alt="详细" width="3" height="5" /> <a href="http://tech.163.com/discover/" class="cDRed">详细</a></p>
</div>
<div id="focusPic3" style="display: none ;">
<div class="pic"> <a href="http://tech.163.com/special/00091MNJ/itobserve015.html"><img src="http://cimg.163.com/tech/2006/1/17/2006011711483290a60.jpg" alt="WAPI并非贸易阴谋" width="240" height="180" border="0" /></a> </div>
<h2><a href="http://tech.163.com/special/00091MNJ/itobserve015.html">WAPI并非贸易阴谋</a></h2>
<p>近日国家做出决定:“将向其他的国内及国外企业公布该算法”。事实证明中国WAPI标准并非是贸易阴谋。<img src="/newimg/i2.gif" alt="详细" width="3" height="5" /> <a href="http://tech.163.com/special/00091MNJ/itobserve015.html" class="cDRed">详细</a></p>
</div>
<div id="focusPic4" style="display: none ;">
<div class="pic"> <a href="http://tech.163.com/special/00091OSI/horizons.html"><img src="http://cimg.163.com/tech/2006/1/17/200601171002503f251.jpg" alt="新视野号探测冥王星特别专题" width="240" height="180" border="0" /></a> </div>
<h2><a href="http://tech.163.com/special/00091OSI/horizons.html">新视野号探测冥王星特别专题</a></h2>
<p>美国宇航局将于北京时间18日凌晨2时24分发射新视野号探测器,造访这颗人类唯一尚未探测过的行星-冥王星。<img src="/newimg/i2.gif" alt="详细" width="3" height="5" /> <a href="http://tech.163.com/special/00091OSI/horizons.html" class="cDRed">详细</a></p>
</div>
<div class="more">
<div class="textNum">
<div class="text">> 更多头图新闻</div>
<div class="num bg1" id="focusPic1nav" style="display: block;">
<ul>
<li>1</li>
<li><a href="javascript:setFocus1(2);" target="_self">2</a></li>
<li><a href="javascript:setFocus1(3);" target="_self">3</a></li>
<li><a href="javascript:setFocus1(4);" target="_self">4</a></li>
</ul>
</div>
<div class="num bg2" id="focusPic2nav" style="display: none;">
<ul>
<li><a href="javascript:setFocus1(1);" target="_self">1</a></li>
<li>2</li>
<li><a href="javascript:setFocus1(3);" target="_self">3</a></li>
<li><a href="javascript:setFocus1(4);" target="_self">4</a></li>
</ul>
</div>
<div class="num bg3" id="focusPic3nav" style="display: none;">
<ul>
<li><a href="javascript:setFocus1(1);" target="_self">1</a></li>
<li><a href="javascript:setFocus1(2);" target="_self">2</a></li>
<li>3</li>
<li><a href="javascript:setFocus1(4);" target="_self">4</a></li>
</ul>
</div>
<div class="num bg4" id="focusPic4nav" style="display: none;">
<ul>
<li><a href="javascript:setFocus1(1);" target="_self">1</a></li>
<li><a href="javascript:setFocus1(2);" target="_self">2</a></li>
<li><a href="javascript:setFocus1(3);" target="_self">3</a></li>
<li>4</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


18、导航条自动隐藏,鼠标触发。

网页特效、JavaScript经典效果_sed HTML代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://vip.aou.cn/csqf/new_page_3.htm -->
<HTML><HEAD><TITLE>New Page 28</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<STYLE>#ssm2 A {
FONT-SIZE: 12px; COLOR: #808080; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
#ssm2 A:hover {
COLOR: #ccff33
}
body{background:url(http://www.infowe.com/images/infowe.gif) no-repeat right center fixed;}
</STYLE>
</HEAD>
<BODY>
<SCRIPT language=JavaScript1.2>
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
function highlight(x){
document.forms[x].elements[0].focus()
document.forms[x].elements[0].select()
}
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
var NS
IE=document.all;
NS=document.layers;
hdrFontFamily="Verdana";
hdrFontSize="2";
hdrFontColor="white";
hdrBGColor="#CCCCCC";
linkFontFamily="Verdana";
linkFontSize="2";
linkBGColor="white";
linkOverBGColor="#CCCCCC";
linkTarget="_top";
YOffset=60;
staticYOffset=20;
menuBGColor="#CCCCCC";
menuIsStatic="no";
menuHeader="Main Index"
menuWidth=150; // Must be a multiple of 5!
staticMode="advanced"
barBGColor="#C0C0C0";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="white";
barText="MENU";
function moveOut() {
if (window.cancel) {
cancel="";
}
if (window.moving2) {
clearTimeout(moving2);
moving2="";
}
if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {
if (IE) {ssm2.style.pixelLeft += (5%menuWidth);
}
if (NS) {
document.ssm2.left += (5%menuWidth);
}
moving1 = setTimeout('moveOut()', 5)
}
else {
clearTimeout(moving1)
}
};
function moveBack() {
cancel = moveBack1()
}
function moveBack1() {
if (window.moving1) {
clearTimeout(moving1)
}
if ((IE && ssm2.style.pixelLeft>(-menuWidth))||(NS && document.ssm2.left>(-150))) {
if (IE) {ssm2.style.pixelLeft -= (5%menuWidth);
}
if (NS) {
document.ssm2.left -= (5%menuWidth);
}
moving2 = setTimeout('moveBack1()', 5)}
else {
clearTimeout(moving2)
}
};
lastY = 0;
function makeStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=ssm2.style
}
if (NS) {winY = window.pageYOffset;var NM=document.ssm2
}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;
}
setTimeout('makeStatic("smooth")', 1)
}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset
}
if (NS) {NM.top=winY+staticYOffset
}
}
else {
if (IE) {NM.pixelTop=YOffset
}
if (NS) {NM.top=YOffset-7
}
}
setTimeout('makeStatic("advanced")', 1)
}
}
function init() {
if (IE) {
ssm2.style.pixelLeft = -menuWidth;
ssm2.style.visibility = "visible"
}
else if (NS) {
document.ssm2.left = -menuWidth;
document.ssm2.visibility = "show"
}
else {
alert('Choose either the "smooth" or "advanced" static modes!')
}
}
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
</SCRIPT>
<SCRIPT language=JavaScript1.2>
if (IE) {document.write('<DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm2" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}
tempBar=""
for (i=0;i<barText.length;i++) {
tempBar+=barText.substring(i, i+1)+"<BR>"}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+16+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+menuWidth+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center" rowspan="100" width="16" bgcolor="'+barBGColor+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')
function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssm2Items">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}
function addHdr(text) {
document.write('<tr><td bgcolor="'+hdrBGColor+'" WIDTH="140"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}
//Only edit the script between HERE
addItem('偶和叶子', 'http://vip.aou.cn/csqf/about.htm', '');
addItem('聆听心海', 'http://vip.aou.cn/csqf/linting.htm', '');
addItem('风言风语', 'http://vip.aou.cn/csqf/fyfy.htm', '');
addItem('风行风影', 'http://vip.aou.cn/csqf/fxfy.htm', '');
addItem('雁过留声', 'http://csqf.etp21.com/', '_blank');
addHdr('WELCOME TO');
addItem('经广俱乐部', 'http://dj973.tz315.net', '_blank');
// and HERE! No more!
document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>')
if (IE) {document.write('</DIV>')}
if (NS) {document.write('</LAYER>')}
if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}
</SCRIPT>
<SCRIPT>
window.onload=init
</SCRIPT>
<p style="height:1000px;"></p>
</BODY></HTML>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


19、下拉菜单导航特效

网页特效、JavaScript经典效果_sed HTML代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>nav</title>
<script language="javascript">
// JavaScript Document
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</script>
<style type="text/css">
<!--
body {
font: normal 11px verdana;
}
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px; /* Width of Menu Items */
border-bottom: 1px solid #ccc;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 149px; /* Set 1px less than menu width */
top: 0;
display: none;
}
/* Styles for Menu Items */
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff; /* IE6 Bug */
padding: 5px;
border: 1px solid #ccc; /* IE6 Bug */
border-bottom: 0;
}
/* Holly Hack. IE Requirement \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
li:hover ul, li.over ul { display: block; } /* The magic */
-->
</style>
</head>
<body>
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a>
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Offices</a></li>
</ul>
</li>
<li><a href="#">Services</a>
<ul>
<li><a href="#">Web Design</a></li>
<li><a href="#">Internet Marketing</a></li>
<li><a href="#">Hosting</a></li>
<li><a href="#">Domain Names</a></li>
<li><a href="#">Broadband</a></li>
</ul>
</li>
<li><a href="#">Contact Us</a>
<ul>
<li><a href="#">United Kingdom</a></li>
<li><a href="#">France</a></li>
<li><a href="#">USA</a></li>
<li><a href="#">Australia</a></li>
</ul>
</li>
</ul>
</body>
</html>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


20、Yi人社区版面最新帖子 效果代码

网页特效、JavaScript经典效果_sed HTML代码
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script><style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #666666;
}
a {
font-size: 12px;
color: #666666;
}
a:hover {
color: #FF6600;
text-decoration: none;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<BODY leftMargin=0 topMargin=0>
<TABLE width=278 height="154" border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD height=20 align="center"><DIV id=Layer1
style="Z-INDEX: 2; WIDTH: 19px; POSITION: absolute; HEIGHT: 10px; left: 241px; top: 33px;">
<DIV id=motorola
style="Z-INDEX: 10; LEFT: -237px; WIDTH: 268px; POSITION: absolute; TOP: -6px;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF">小夜博客</td>
</tr>
</table>
</DIV>
<DIV id=up2u
style="Z-INDEX: 4; LEFT: -237px; WIDTH: 268; POSITION: absolute; TOP: -6px;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF"><a href="http://www.wanghaibin.com" target="_blank">xoyoer</a>.94er.cn</td>
</tr>
</table>
</DIV>
<DIV id=mzone
style="Z-INDEX: 4; LEFT: -237px; WIDTH: 268; POSITION: absolute; TOP: -6px;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF">Yi人社区</td>
</tr>
</table>
</DIV>
<DIV id=thinkuk
style="Z-INDEX: 4; LEFT: -237px; WIDTH: 268; POSITION: absolute; TOP: -6px;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF">94er.cn</td>
</tr>
</table>
</DIV>
<div id="Layer2" style="position:absolute; width:268; z-index:8; left: -237px; top: -6px; color: #999999;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF">把这些文字替换成文字或者图片</td>
</tr>
</table>
</div>
<div id="Layer3" class="style8" style="position:absolute; width:268; z-index:9; left: -237px; top: -6px;">
<table width="95%" height="125" border="0" cellpadding=0  cellspacing=0>
<tr>
<td bgcolor="#FFFFFF">:)</td>
</tr>
</table>
</div>
</DIV>
<span class="noline"><A
href="#" class="style8"
onmouseover="MM_showHideLayers('Layer1','','hide','motorola','','show','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','hide')"
onmouseout="MM_showHideLayers('Layer1','','hide','motorola','','show','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','hide')"><font color="#666666">原创</font></A></span> | <span class="noline"><a
href="#" class="style8"
onMouseOver="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','show','mzone','','hide','thinkuk','','hide','Layer3','','hide')"
onMouseOut="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','show','mzone','','hide','thinkuk','','hide','Layer3','','hide')"><font color="#666666">心情</font></a></span> | <span class="noline"><a
href="#" class="style10"
onMouseOver="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','show','thinkuk','','hide','Layer3','','hide')"
onMouseOut="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','show','thinkuk','','hide','Layer3','','hide')"><font color="#666666">资料</font></a></span> | <span class="noline"><a
href="#" class="style8"
onMouseOver="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','show','Layer3','','hide')"
onMouseOut="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','show','Layer3','','hide')"><font color="#666666">美图</font></a></span> | <span class="noline"><a
href="#" class="style8"
onMouseOver="MM_showHideLayers('Layer1','','show','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','hide')"
onMouseOut="MM_showHideLayers('Layer1','','show','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','hide')"><font color="#666666">影音</font></a></span> | <span class="noline"><a
href="#" class="style8"
onMouseOver="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','show')"
onMouseOut="MM_showHideLayers('Layer1','','hide','motorola','','hide','up2u','','hide','mzone','','hide','thinkuk','','hide','Layer3','','show')"><font color="#666666">妙文</font></a></span></TD>
</TR>
<TR>
<TD vAlign=top align=center background=index/index-new.gif height=4><img src=http://www.94er.cn/index/index-new.gif width="280" height="4"></TD>
</TR>
<TR>
<TD vAlign=top align=center background=../under/map1.gif> </TD>
</TR>
</TBODY>
</TABLE>
</BODY>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


21、类似FLASH的图片变换 可控制(新浪女性频道)

网页特效、JavaScript经典效果_sed HTML代码
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TABLE cellSpacing=0 cellPadding=0 width=339 border=0>
<TBODY>
<TR>
<TD style="PADDING-BOTTOM: 7px; PADDING-TOP: 7px" align=center width=422><!--焦点图开始-->
<SCRIPT type=text/javascript>
<!--
var focus_width=389
var focus_height=136
var text_height=0
var swf_height = focus_height+text_height
var pics='http://image2.sina.com.cn/lx/temp/167/U1275P8T167D1F4829DT20060321203029.jpg|http://image2.sina.com.cn/lx/temp/167/U841P8T167D1F4825DT20060321110620.jpg|http://image2.sina.com.cn/lx/temp/167/U841P8T167D1F4827DT20060321142953.jpg|http://image2.sina.com.cn/lx/temp/167/U841P8T167D1F4832DT20060321144028.jpg|http://image2.sina.com.cn/lx/temp/167/U841P8T167D1F4833DT20060321145728.jpg'
var links='http://eladies.sina.com.cn/nx/2005/1021/1534201638.html|http://eladies.sina.com.cn/misc/2005/1010/1317.html|http://miss.sina.phoenixtv.com|http://eladies.sina.com.cn/bbs/p/2005/1021/10354151.html|http://eladies.sina.com.cn/f/supergirl/index.html'
var texts=''
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://image2.sina.com.cn/bj/zonghe/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="http://image2.sina.com.cn/bj/zonghe/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');		document.write('</object>');
//-->
</SCRIPT>
<!--焦点图结束-->



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


22、雅虎图片幻灯片 完全控制:开始暂停

网页特效、JavaScript经典效果_sed HTML代码
<HTML><HEAD><TITLE>最性感的暗示 _<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯</TITLE>
<SCRIPT language=JavaScript>
<!-- Begin
var interval = 6; // delay between rotating images (in seconds)
interval *= 1000;
var flagtime=0;
var image_index = -1;
image_list = new Array();
note_list = new noteArray(10);
var number_of_image = image_list.length;
var timesnum=0;
image_list[0] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z0-a.jpg");
image_list[1] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z1-a.jpg");
image_list[2] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z2-a.jpg");
image_list[3] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z3-a.jpg");
image_list[4] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z4-a.jpg");
image_list[5] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z5-a.jpg");
image_list[6] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z6-a.jpg");
image_list[7] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z7-a.jpg");
image_list[8] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z8-a.jpg");
image_list[9] = new imageItem("http://cn.yimg.com/sp/slideshow/biz/h20050919e132913z9-a.jpg");
note_list[0] = "最性感的暗示1";
note_list[1] = "最性感的暗示2";
note_list[2] = "最性感的暗示3";
note_list[3] = "最性感的暗示4";
note_list[4] = "最性感的暗示5";
note_list[5] = "最性感的暗示11";
note_list[6] = "最性感的暗示111";
note_list[7] = "最性感的暗示111111";
note_list[8] = "最性感的暗示11111";
note_list[9] = "最性感的暗示111111111";
function noteArray(size)
{
this.length=size;
for(i=1;i<=size;i++)
{
this[i]=""
}
return this;
}
function counternum(){
if( timesnum < 10-1){
timesnum++;
document.all.slide_ent.src="about:blank";
document.all.slide_ent.src="http://cn.biz.yahoo.com/slideshow/spaceid_slideshow.html";
}
}
function run(obj){
interval=obj.options[obj.selectedIndex].value*1000;
rotateImage();
}
function stop(){
interval=0;
}
function previous(){
var new_image = getPreviousImage();
document['rImage'].src = new_image;
}
function next(){
var new_image = getNextImage();
document['rImage'].src = new_image;
}
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function noteItem(note) {
this.note_item = new Image();
this.note_item.src = note;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function get_NoteItemLocation(noteObj) {
return(noteObj.note_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getPreviousImage() {
image_index = image_index-1;
if (image_index < 0){
image_index=image_index+10;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
document.all.span_1.innerText=image_index+1;
document.all.summary.innerText=note_list[image_index];
return(new_image);
}
function getNextImage() {
image_index = image_index+1;
if (image_index >= 10){
image_index=image_index-10;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
document.all.span_1.innerText=image_index+1;
document.all.summary.innerText=note_list[image_index];
return(new_image);
}
function rotateImage() {
if (interval == 0){
return 1;
}
if (flagtime == 1){
var now = new Date();
var time1 = now.getTime();
var time2;
time1=time1+3000;
time2=now.getTime();
while(time2 < time1){
now = new Date();
time2=now.getTime();
}
flagtime=0;
}
var new_image = getNextImage();
document['rImage'].src = new_image;
var recur_call = "rotateImage('"+'rImage'+"')";
setTimeout(recur_call,interval);
}
// End -->
</SCRIPT>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<CENTER>
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 bgColor=#fff2df border=0>
<TBODY>
<TR>
<TD vAlign=top align=center>
<TABLE style="BORDER-TOP: #ffffff 1px solid" cellSpacing=0 cellPadding=0
width="100%" bgColor=#9f90cc border=0>
<TBODY>
<TR>
<TD vAlign=bottom height=25><!---->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="TEXT-INDENT: 5px"></TD>
<TD width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
<TBODY>
<TR align=center>
<TD nowarp><BIG><B>酷图放映:</B></BIG></TD>
<TD noWrap width="10%"><A class=ygw
href="#"
target=_blank>财富</A></TD>
<TD><IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="10%"><A class=ygw
href="#"
target=_blank>新闻</A></TD>
<TD>11<IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="10%"><A class=ygw
href="#"
target=_blank>汽车</A></TD>
<TD><IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="10%"><A class=ygw
href="#"
target=_blank>体育</A></TD>
<TD><IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="10%"><A class=ygw
href="#"
target=_blank>娱乐</A></TD>
<TD><IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="10%">两性</TD>
<TD><IMG height=23 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_2.gif"
width=2 border=0></TD>
<TD noWrap width="14%">图片下载</TD>
</TR></TBODY></TABLE></TD>
<TD></TD></TR></TBODY></TABLE><!--/--></TD></TR>
<TR>
<TD><IMG height=3 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg.gif" width=468
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=13></TD></TR></TBODY></TABLE><!--img447*333-->
<TABLE height=333 cellSpacing=0 cellPadding=0 width=447 border=0>
<TBODY>
<TR>
<TD align=center><IMG src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/h20050919e132913z0-a.jpg"
onload=counternum() border=0 name=rImage></TD></TR></TBODY></TABLE><!--/img447*333--><!--text-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD id=summary align=center height=28>最性感的暗示</TD></TR></TBODY></TABLE><!--/text--><!--bottom-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=4 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshow_bg_3.gif" width=468
border=0></TD></TR>
<TR>
<TD bgColor=#c9beeb height=25>
<TABLE cellSpacing=0 cellPadding=1 width="100%" border=0>
<FORM name=form1>
<TBODY>
<TR>
<TD width=80></TD>
<TD class=sbody align=left><SPAN
id=span_1>1</SPAN>/10    <IMG
onclick=run(document.form1.select1) height=21 alt=开始
src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshows_bottom_1.gif" width=35
align=absMiddle border=0>  <IMG onclick=stop()
height=21 alt=停止 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshows_bottom_2.gif"
width=35 align=absMiddle border=0>   <IMG
onclick=previous() height=21 alt=前一张
src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshows_bottom_3.gif" width=35
align=absMiddle border=0>  <IMG onclick=next()
height=21 alt=后一张 src="<a href="http://www.yahoo.com" target="_blank">雅虎</a>幻灯.files/slideshows_bottom_4.gif"
width=35 align=absMiddle border=0>  速度: <Select
onchange=run(this) name=select1> <OPTION value=12>12
sec.</OPTION> <OPTION value=6 selected>6 sec.</OPTION>
<OPTION value=3>3 sec.</OPTION> <OPTION value=9>9
sec.</OPTION></Select></TD></TR></FORM></TABLE></TD></TR>
<TR>
<TD bgColor=#625a68 height=1></TD></TR></TABLE><!--/bottom-->
<!---AS 20041229--->
<SCRIPT language=JavaScript>
var as_target="_blank";
var as_URL = new Array();
as_URL[1] = "http://cn.rd.yahoo.com/SIG=12f65qvb8/M=356461.7219382.8125505.3548321/D=cn_biz/S=96897190:AS/Y=yahoo/EXP=1127606048/A=3002455/R=0/*http://cn.zs.yahoo.com";
var as_link1 = "javascript:ASopenWindow(1)";
var as_flashfile='http://cn.yimg.com/a/cn/daphne/356461_as_15sep05.swf?clickTAG='+as_link1+'';
var as_altURL="http://cn.rd.yahoo.com/SIG=12f65qvb8/M=356461.7219382.8125505.3548321/D=cn_biz/S=96897190:AS/Y=yahoo/EXP=1127606048/A=3002455/R=1/id=altimgurl/*http://cn.zs.yahoo.com";
var as_altimg="http://cn.yimg.com/a/cn/ethan/468x60.gif";
var as_width=468;
var as_height=60;
</SCRIPT>
<!---AS 20041229---></TD></TR><td height="10"></TBODY></TABLE><!--/--></CENTER>
<SCRIPT language=javascript>
flagtime=1;
rotateImage();
slideit()
</SCRIPT>
<!-- w5.biz.cnb.yahoo.com compressed/chunked Sat Sep 24 07:54:08 CST 2005 --></CENTER></BODY></HTML>



[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]