首页编程java编程javascript简单代码(在javascript中)

javascript简单代码(在javascript中)

编程之家2026-05-22851次浏览

很多朋友对于javascript简单代码和在javascript中不太懂,今天就由小编来为大家分享,希望可以帮助到大家,下面一起来看看吧!

javascript简单代码(在javascript中)

<大虾进> javascript常用脚本代码有那些呀

适合阅读范围:对JavaScript一无所知~离精通只差一步之遥的人

基础知识:HTML

JavaScript就这么回事1:基础知识

1创建脚本块

1:<script language=”JavaScript”>

2: JavaScript code goes here

javascript简单代码(在javascript中)

3:</script>

2隐藏脚本代码

1:<script language=”JavaScript”>

2:<!--

3: document.write(“Hello”);

4://-->

javascript简单代码(在javascript中)

5:</script>

在不支持JavaScript的浏览器中将不执行相关代码

3浏览器不支持的时候显示

1:<noscript>

2: Hello to the non-JavaScript browser.

3:</noscript>

4链接外部脚本文件

1:<script language=”JavaScript” src="/”filename.js"”></script>

5注释脚本

1:// This is a comment

2: document.write(“Hello”);// This is a comment

3:/*

4: All of this

5: is a comment

6:*/

6输出到浏览器

1: document.write(“<strong>Hello</strong>”);

7定义变量

1: var myVariable=“some value”;

8字符串相加

1: var myString=“String1”+“String2”;

9字符串搜索

1:<script language=”JavaScript”>

2:<!--

3: var myVariable=“Hello there”;

4: var therePlace= myVariable.search(“there”);

5: document.write(therePlace);

6://-->

7:</script>

10字符串替换

1: thisVar.replace(“Monday”,”Friday”);

11格式化字串

1:<script language=”JavaScript”>

2:<!--

3: var myVariable=“Hello there”;

4: document.write(myVariable.big()+“<br/>”);

5: document.write(myVariable.blink()+“<br/>”);

6: document.write(myVariable.bold()+“<br/>”);

7: document.write(myVariable.fixed()+“<br/>”);

8: document.write(myVariable.fontcolor(“red”)+“<br/>”);

9: document.write(myVariable.fontsize(“18pt”)+“<br/>”);

10: document.write(myVariable.italics()+“<br/>”);

11: document.write(myVariable.small()+“<br/>”);

12: document.write(myVariable.strike()+“<br/>”);

13: document.write(myVariable.sub()+“<br/>”);

14: document.write(myVariable.sup()+“<br/>”);

15: document.write(myVariable.toLowerCase()+“<br/>”);

16: document.write(myVariable.toUpperCase()+“<br/>”);

17:

18: var firstString=“My String”;

19: var finalString= firstString.bold().toLowerCase().fontcolor(“red”);

20://-->

21:</script>

12创建数组

1:<script language=”JavaScript”>

2:<!--

3: var myArray= new Array(5);

4: myArray[0]=“First Entry”;

5: myArray[1]=“Second Entry”;

6: myArray[2]=“Third Entry”;

7: myArray[3]=“Fourth Entry”;

8: myArray[4]=“Fifth Entry”;

9: var anotherArray= new Array(“First Entry”,”Second Entry”,”Third Entry”,”Fourth Entry”,”Fifth Entry”);

10://-->

11:</script>

13数组排序

1:<script language=”JavaScript”>

2:<!--

3: var myArray= new Array(5);

4: myArray[0]=“z”;

5: myArray[1]=“c”;

6: myArray[2]=“d”;

7: myArray[3]=“a”;

8: myArray[4]=“q”;

9: document.write(myArray.sort());

10://-->

11:</script>

14分割字符串

1:<script language=”JavaScript”>

2:<!--

3: var myVariable=“a,b,c,d”;

4: var stringArray= myVariable.split(“,”);

5: document.write(stringArray[0]);

6: document.write(stringArray[1]);

7: document.write(stringArray[2]);

8: document.write(stringArray[3]);

9://-->

10:</script>

15弹出警告信息

1:<script language=”JavaScript”>

2:<!--

3: window.alert(“Hello”);

4://-->

5:</script>

16弹出确认框

1:<script language=”JavaScript”>

2:<!--

3: var result= window.confirm(“Click OK to continue”);

4://-->

5:</script>

17定义函数

1:<script language=”JavaScript”>

2:<!--

3: function multiple(number1,number2){

4: var result= number1* number2;

5: return result;

6:}

7://-->

8:</script>

18调用JS函数

1:<a href=”#” onClick=”functionName()”>Link text</a>

2:<a rel="external nofollow" href="/”javascript:functionName"()”>Link text</a>

19在页面加载完成后执行函数

1:<body onLoad=”functionName();”>

2: Body of the page

3:</body>

20条件判断

1:<script>

2:<!--

3: var userChoice= window.confirm(“Choose OK or Cancel”);

4: var result=(userChoice== true)?“OK”:“Cancel”;

5: document.write(result);

6://-->

7:</script>

21指定次数循环

1:<script>

2:<!--

3: var myArray= new Array(3);

4: myArray[0]=“Item 0”;

5: myArray[1]=“Item 1”;

6: myArray[2]=“Item 2”;

7: for(i= 0; i< myArray.length; i++){

8: document.write(myArray[i]+“<br/>”);

9:}

10://-->

11:</script>

22设定将来执行

1:<script>

2:<!--

3: function hello(){

4: window.alert(“Hello”);

5:}

6: window.setTimeout(“hello()”,5000);

7://-->

8:</script>

23定时执行函数

1:<script>

2:<!--

3: function hello(){

4: window.alert(“Hello”);

5: window.setTimeout(“hello()”,5000);

6:}

7: window.setTimeout(“hello()”,5000);

8://-->

9:</script>

24取消定时执行

1:<script>

2:<!--

3: function hello(){

4: window.alert(“Hello”);

5:}

6: var myTimeout= window.setTimeout(“hello()”,5000);

7: window.clearTimeout(myTimeout);

8://-->

9:</script>

25在页面卸载时候执行函数

1:<body onUnload=”functionName();”>

2: Body of the page

3:</body>

JavaScript就这么回事2:浏览器输出

26访问document对象

1:<script language=”JavaScript”>

2: var myURL= document.URL;

3: window.alert(myURL);

4:</script>

27动态输出HTML

1:<script language=”JavaScript”>

2: document.write(“<p>Here’s some information about this document:</p>”);

3: document.write(“<ul>”);

4: document.write(“<li>Referring Document:“+ document.referrer+“</li>”);

5: document.write(“<li>Domain:“+ document.domain+“</li>”);

6: document.write(“<li>URL:“+ document.URL+“</li>”);

7: document.write(“</ul>”);

8:</script>

28输出换行

1: document.writeln(“<strong>a</strong>”);

2: document.writeln(“b”);

29输出日期

1:<script language=”JavaScript”>

2: var thisDate= new Date();

3: document.write(thisDate.toString());

4:</script>

30指定日期的时区

1:<script language=”JavaScript”>

2: var myOffset=-2;

3: var currentDate= new Date();

4: var userOffset= currentDate.getTimezoneOffset()/60;

5: var timeZoneDifference= userOffset- myOffset;

6: currentDate.setHours(currentDate.getHours()+ timeZoneDifference);

7: document.write(“The time and date in Central Europe is:“+ currentDate.toLocaleString());

8:</script>

31设置日期输出格式

1:<script language=”JavaScript”>

2: var thisDate= new Date();

3: var thisTimeString= thisDate.getHours()+“:”+ thisDate.getMinutes();

4: var thisDateString= thisDate.getFullYear()+“/”+ thisDate.getMonth()+“/”+ thisDate.getDate();

5: document.write(thisTimeString+“ on“+ thisDateString);

6:</script>

32读取URL参数

1:<script language=”JavaScript”>

2: var urlParts= document.URL.split(“?”);

3: var parameterParts= urlParts[1].split(“&”);

4: for(i= 0; i< parameterParts.length; i++){

5: var pairParts= parameterParts[i].split(“=”);

6: var pairName= pairParts[0];

7: var pairValue= pairParts[1];

8: document.write(pairName+“:“+pairValue);

9:}

10:</script>

你还以为HTML是无状态的么?

33打开一个新的document对象

1:<script language=”JavaScript”>

2: function newDocument(){

3: document.open();

4: document.write(“<p>This is a New Document.</p>”);

5: document.close();

6:}

7:</script>

34页面跳转

1:<script language=”JavaScript”>

2: window.location=“”;

3:</script>

35添加网页加载进度窗口

1:<html>

2:<head>

3:<script language='javaScript'>

4: var placeHolder= window.open('holder.html','placeholder','width=200,height=200');

5:</script>

6:<title>The Main Page</title>

7:</head>

8:<body onLoad='placeHolder.close()'>

9:<p>This is the main page</p>

10:</body>

11:</html>

36读取图像属性

1:<img src="/”image1.jpg"” name=”myImage”>

2:<a href=”#” onClick=”window.alert(document.myImage.width)”>Width</a>

3:

37动态加载图像

1:<script language=”JavaScript”>

2: myImage= new Image;

3: myImage.src=“Tellers1.jpg”;

4:</script>

38简单的图像替换

1:<script language=”JavaScript”>

2: rollImage= new Image;

3: rollImage.src=“rollImage1.jpg”;

4: defaultImage= new Image;

5: defaultImage.src=“image1.jpg”;

6:</script>

7:<a rel="external nofollow" href="/”myUrl"” onMouseOver=”document.myImage.src= rollImage.src;”

8: onMouseOut=”document.myImage.src= defaultImage.src;”>

9:<img src="/”image1.jpg"” name=”myImage” width=100 height=100 border=0>

39随机显示图像

1:<script language=”JavaScript”>

2: var imageList= new Array;

3: imageList[0]=“image1.jpg”;

4: imageList[1]=“image2.jpg”;

5: imageList[2]=“image3.jpg”;

6: imageList[3]=“image4.jpg”;

7: var imageChoice= Math.floor(Math.random()* imageList.length);

8: document.write(‘<img src=”’+ imageList[imageChoice]+‘“>’);

9:</script>

40函数实现的图像替换

1:<script language=”JavaScript”>

2: var source= 0;

3: var replacement= 1;

4: function createRollOver(originalImage,replacementImage){

5: var imageArray= new Array;

6: imageArray[source]= new Image;

7: imageArray[source].src= originalImage;

8: imageArray[replacement]= new Image;

9: imageArray[replacement].src= replacementImage;

10: return imageArray;

11:}

12: var rollImage1= createRollOver(“image1.jpg”,”rollImage1.jpg”);

13:</script>

14:<a href=”#” onMouseOver=”document.myImage1.src= rollImage1[replacement].src;”

15: onMouseOut=”document.myImage1.src= rollImage1[source].src;”>

16:<img src="/”image1.jpg"” width=100 name=”myImage1” border=0>

17:</a>

41创建幻灯片

1:<script language=”JavaScript”>

2: var imageList= new Array;

3: imageList[0]= new Image;

4: imageList[0].src=“image1.jpg”;

5: imageList[1]= new Image;

6: imageList[1].src=“image2.jpg”;

7: imageList[2]= new Image;

8: imageList[2].src=“image3.jpg”;

9: imageList[3]= new Image;

10: imageList[3].src=“image4.jpg”;

11: function slideShow(imageNumber){

12: document.slideShow.src= imageList[imageNumber].src;

13: imageNumber+= 1;

14: if(imageNumber< imageList.length){

15: window.setTimeout(“slideShow(“+ imageNumber+“)”,3000);

16:}

17:}

18:</script>

19:</head>

20:<body onLoad=”slideShow(0)”>

21:<img src="/”image1.jpg"” width=100 name=”slideShow”>

42随机广告图片

1:<script language=”JavaScript”>

2: var imageList= new Array;

3: imageList[0]=“image1.jpg”;

4: imageList[1]=“image2.jpg”;

5: imageList[2]=“image3.jpg”;

6: imageList[3]=“image4.jpg”;

7: var urlList= new Array;

8: urlList[0]=“”;

9: urlList[1]=“”;

10: urlList[2]=“”;

11: urlList[3]=“”;

12: var imageChoice= Math.floor(Math.random()* imageList.length);

13: document.write(‘<a href=”’+ urlList[imageChoice]+‘“><img src=”’+ imageList[imageChoice]+‘“></a>’);

14:</script>

JavaScript就这么回事4:表单

还是先继续写完JS就这么回事系列吧~

43表单构成

1:<form method=”post” action=”target.html” name=”thisForm”>

2:<input type=”text” name=”myText”>

3:<select name=”mySelect”>

4:<option value=”1”>First Choice</option>

5:<option value=”2”>Second Choice</option>

6:</select>

7:<br/>

8:<input type=”submit” value=”Submit Me”>

9:</form>

44访问表单中的文本框内容

1:<form name=”myForm”>

2:<input type=”text” name=”myText”>

3:</form>

4:<a href='#' onClick='window.alert(document.myForm.myText.value);'>Check Text Field</a>

45动态复制文本框内容

1:<form name=”myForm”>

2: Enter some Text:<input type=”text” name=”myText”><br/>

3: Copy Text:<input type=”text” name=”copyText”>

4:</form>

5:<a href=”#” onClick=”document.myForm.copyText.value=

6: document.myForm.myText.value;”>Copy Text Field</a>

46侦测文本框的变化

1:<form name=”myForm”>

2: Enter some Text:<input type=”text” name=”myText” onChange=”alert(this.value);”>

3:</form>

47访问选中的Select

1:<form name=”myForm”>

2:<select name=”mySelect”>

3:<option value=”First Choice”>1</option>

4:<option value=”Second Choice”>2</option>

5:<option value=”Third Choice”>3</option>

6:</select>

7:</form>

8:<a href='#' onClick='alert(document.myForm.mySelect.value);'>Check Selection List</a>

48动态增加Select项

1:<form name=”myForm”>

2:<select name=”mySelect”>

3:<option value=”First Choice”>1</option>

4:<option value=”Second Choice”>2</option>

5:</select>

6:</form>

7:<script language=”JavaScript”>

8: document.myForm.mySelect.length++;

9: document.myForm.mySelect.options[document.myForm.mySelect.length- 1].text=“3”;

10: document.myForm.mySelect.options[document.myForm.mySelect.length- 1].value=“Third Choice”;

11:</script>

49验证表单字段

1:<script language=”JavaScript”>

2: function checkField(field){

3: if(field.value==“”){

4: window.alert(“You must enter a value in the field”);

5: field.focus();

6:}

7:}

8:</script>

9:<form name=”myForm” action=”target.html”>

10: Text Field:<input type=”text” name=”myField”onBlur=”checkField(this)”>

11:<br/><input type=”submit”>

12:</form>

50验证Select项

1: function checkList(selection){

2: if(selection.length== 0){

3: window.alert(“You must make a selection from the list.”);

4: return false;

5:}

6: return true;

7:}

51动态改变表单的action

1:<form name=”myForm” action=”login.html”>

2: Username:<input type=”text” name=”username”><br/>

3: Password:<input type=”password” name=”password”><br/>

4:<input type=”button” value=”Login” onClick=”this.form.submit();”>

5:<input type=”button” value=”Register” onClick=”this.form.action=‘register.html’; this.form.submit();”>

6:<input type=”button” value=”Retrieve Password” onClick=”this.form.action=‘password.html’; this.form.submit();”>

7:</form>

52使用图像按钮

1:<form name=”myForm” action=”login.html”>

2: Username:<input type=”text” name=”username”><br/>

3: Password:<input type=”password”name=”password”><br/>

4:<input type=”image” src="/”login.gif"” value=”Login”>

5:</form>

6:

53表单数据的加密

1:<SCRIPT LANGUAGE='JavaScript'>

2:<!--

3: function encrypt(item){

4: var newItem='';

5: for(i=0; i< item.length; i++){

6: newItem+= item.charCodeAt(i)+'.';

7:}

8: return newItem;

9:}

10: function encryptForm(myForm){

11: for(i=0; i< myForm.elements.length; i++){

12: myForm.elements[i].value= encrypt(myForm.elements[i].value);

13:}

14:}

15:

16://-->

17:</SCRIPT>

18:<form name='myForm' onSubmit='encryptForm(this); window.alert(this.myField.value);'>

19: Enter Some Text:<input type=text name=myField><input type=submit>

20:</form>

JavaScript就这么回事5:窗口和框架

54改变浏览器状态栏文字提示

1:<script language=”JavaScript”>

2: window.status=“A new status message”;

3:</script>

55弹出确认提示框

1:<script language=”JavaScript”>

2: var userChoice= window.confirm(“Click OK or Cancel”);

3: if(userChoice){

4: document.write(“You chose OK”);

5:} else{

6: document.write(“You chose Cancel”);

7:}

8:</script>

56提示输入

1:<script language=”JavaScript”>

2: var userName= window.prompt(“Please Enter Your Name”,”Enter Your Name Here”);

3: document.write(“Your Name is“+ userName);

4:</script>

57打开一个新窗口

1://打开一个名称为myNewWindow的浏览器新窗口

2:<script language=”JavaScript”>

3: window.open(“”,”myNewWindow”);

4:</script>

58设置新窗口的大小

1:<script language=”JavaScript”>

2: window.open(“”,”myNewWindow”,'height=300,width=300');

3:</script>

59设置新窗口的位置

1:<script language=”JavaScript”>

2: window.open(“”,”myNewWindow”,'height=300,width=300,left=200,screenX=200,top=100,screenY=100');

3:</script>

60是否显示工具栏和滚动栏

1:<script language=”JavaScript”>

2: window.open(“http:

61是否可以缩放新窗口的大小

1:<script language=”JavaScript”>

2: window.open(';);</script>

62加载一个新的文档到当前窗口

1:<a href='#' onClick='document.location='125a.html';'>Open New Document</a>

63设置页面的滚动位置

1:<script language=”JavaScript”>

2: if(document.all){//如果是IE浏览器则使用scrollTop属性

3: document.body.scrollTop= 200;

4:} else{//如果是NetScape浏览器则使用pageYOffset属性

5: window.pageYOffset= 200;

6:}</script>

64在IE中打开全屏窗口

1:<a href='#' onClick=”window.open(';);”>Open a full-screen window</a>

65新窗口和父窗口的操作

1:<script language=”JavaScript”>

2://定义新窗口

3: var newWindow= window.open(“128a.html”,”newWindow”);

4: newWindow.close();//在父窗口中关闭打开的新窗口

5:</script>

6:在新窗口中关闭父窗口

7: window.opener.close()

66往新窗口中写内容

1:<script language=”JavaScript”>

2: var newWindow= window.open(“”,”newWindow”);

3: newWindow.document.open();

4: newWindow.document.write(“This is a new window”);

5: newWIndow.document.close();

6:</script>

67加载页面到框架页面

1:<frameset cols=”50%,*”>

2:<frame name=”frame1” src="/”135a.html"”>

3:<frame name=”frame2” src="/”about:blank"”>

4:</frameset>

5:在frame1中加载frame2中的页面

6: parent.frame2.document.location=“135b.html”;

68在框架页面之间共享脚本

如果在frame1中html文件中有个脚本

1: function doAlert(){

2: window.alert(“Frame 1 is loaded”);

3:}

那么在frame2中可以如此调用该方法

1:<body onLoad=”parent.frame1.doAlert();”>

2: This is frame 2.

3:</body>

69数据公用

可以在框架页面定义数据项,使得该数据可以被多个框架中的页面公用

1:<script language=”JavaScript”>

2: var persistentVariable=“This is a persistent value”;

3:</script>

4:<frameset cols=”50%,*”>

5:<frame name=”frame1” src="/”138a.html"”>

6:<frame name=”frame2” src="/”138b.html"”>

7:</frameset>

这样在frame1和frame2中都可以使用变量persistentVariable

70框架代码库

根据以上的一些思路,我们可以使用一个隐藏的框架页面来作为整个框架集的代码库

1:<frameset cols=”0,50%,*”>

2:<frame name=”codeFrame” src="/”140code.html"”>

3:<frame name=”frame1” src="/”140a.html"”>

4:<frame name=”frame2” src="/”140b.html"”>

5:</frameset>

javascript代码实现

1)布局排版

2)鼠标移上文本框发光效果实现:给文本框取一个ID号,如txtInput,设置如下CSS样式:#txtInput:hover{box-shadow:0px0px 5px 0px#0000ff;},其中#txtInput:hover表示鼠标移上ID为txtInput的网页元素。box-shadow为CSS3属性,表示边框有阴影。

3)应用文本框.onkeydown事件处理按下键盘事件,判断当文本框内内容长度大于规定长度时,事件处理函数返回false,使得按下键盘不起作用。文本框内内容用文本框.value获取。

4)应用文本框onkeyup事件处理松开键盘事件,处理将文本框中内容的长度写到文本框下方的计数位置上。文本框内容的长度可用文本框.value.length获取。

1)文本框中没有输入内容时,显示“请输入个人信息”这几个提示文字,且文字为灰色。

2)文本框聚焦时提示文字消失。

3)文本框中输入内容时,提示文字消失,输入文字为黑色。

4)当文本框中文字内容长度已达到最大值时,删除键仍然有用,可以删除文本框中文本,且删除时字符总数相应修改。

5)当文本框中文字内容全部删除时,提示文字出现。

提示:

1)事件处理程序默认带有一个参数,用e表示,可以通过e.which获取按下键的码值。注意:e.which用于非IE浏览器,IE浏览器要用window.event.keyCode获取。

2)注意文本框onfocus事件的应用。

求个简单javascript代码 谢谢,网站菜单功能

不用说自己菜不菜的,能有这个学习的精神已经很值得鼓励了

呵呵,下面,我来给你介绍几个网站常见的菜单

第一个:仿网易的滑动门导航菜单

<html xmlns="">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>

<title>仿网易的滑动门技术,用DIV+CSS技术实现</title>

<style type="text/css">

<!--

#header{

background-color:#F8F4EF;

height: 200px;

width: 400px;

margin: 0px;

padding: 0px;

border: 1px solid#ECE1D5;

font-family:"宋体";

font-size: 12px;

}

#menu{

margin: 0px;

padding: 0px;

list-style-type: none;

}

#menu li{

display: block;

width: 100px;

text-align: center;

float: left;

margin: 0px;

padding-top: 0.2em;

padding-right: 0px;

padding-bottom: 0.2em;

padding-left: 0px;

cursor: hand;

}

.sec1{ background-color:#FFFFCC;}

.sec2{ background-color:#00CCFF;}

.block{ display: block;}

.unblock{ display: none;}

-->

</style>

</head>

<body>

<script language=javascript>

function secBoard(n)

{

for(i=0;i<menu.childNodes.length;i++)

menu.childNodes[i].className="sec1";

menu.childNodes[n].className="sec2";

for(i=0;i<main.childNodes.length;i++)

main.childNodes[i].style.display="none";

main.childNodes[n].style.display="block";

}

</script>

<div id="header">

<ul id="menu">

<li onMouseOver="secBoard(0)" class="sec2">最新新闻</li>

<li onMouseOver="secBoard(1)" class="sec1">最新文章</li>

<li onMouseOver="secBoard(2)" class="sec1">最新日志</li>

<li onMouseOver="secBoard(3)" class="sec1">论坛新帖</li>

</ul>

<!--内容显示区域-->

<ul id="main">

<li class="block">第一个内容</li>

<li class="unblock">第二个内容</li>

<li class="unblock">第三个内容</li>

<li class="unblock">第四个内容</li>

</ul>

<!--内容显示区域-->

</div>

</body>

</html>

这里基本上是使用Css与Div的结合,在整个布局中已层为单位,实行滑动菜单的是一个javascript脚本函数,调用就可以了,看不懂不要紧,日渐积累才是重要

第二个:经典实用的触发型导航(这是鼠标单击事件控制)

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效代码|JsCode.CN|---经典实用的触发型导航菜单</title>

</head>

<body>

<STYLE type=text/css>.sec1{

BORDER-RIGHT: gray 1px solid; BORDER-TOP:

#ffffff 1px solid; BORDER-LEFT:#ffffff 1px

solid; CURSOR: hand; COLOR:#000000; BORDER-

BOTTOM:#ffffff 1px solid; BACKGROUND-COLOR:

#eeeeee

}

.sec2{

BORDER-RIGHT: gray 1px solid; BORDER-TOP:

#ffffff 1px solid; FONT-WEIGHT: bold; BORDER-

LEFT:#ffffff 1px solid; CURSOR: hand; COLOR:

#000000; BACKGROUND-COLOR:#d4d0c8

}

.main_tab{

BORDER-RIGHT: gray 1px solid; BORDER-

LEFT:#ffffff 1px solid; COLOR:#000000; BORDER-

BOTTOM: gray 1px solid; BACKGROUND-COLOR:#d4d0c8

}

</STYLE>

<!--JavaScript部分-->

<SCRIPT language=javascript>

function secBoard(n)

{

for(i=0;i<secTable.cells.length;i++)

secTable.cells

[i].className="sec1";

secTable.cells[n].className="sec2";

for(i=0;i<mainTable.tBodies.length;i++)

mainTable.tBodies

[i].style.display="none";

mainTable.tBodies

[n].style.display="block";

}

</SCRIPT>

<!--HTML部分-->

<TABLE id=secTable cellSpacing=0 cellPadding=0 width=549 border=0>

<TBODY>

<TR align=middle height=20>

<TD class=sec2 onclick=secBoard(0) width="10%">关于TBODY标记</TD>

<TD class=sec1 onclick=secBoard(1) width="10%">关于cells集合</TD>

<TD class=sec1 onclick=secBoard(2) width="10%">关于tBodies集合</TD>

<TD class=sec1 onclick=secBoard(3) width="10%">关于display属性</TD></TR></TBODY></TABLE>

<TABLE class=main_tab id=mainTable height=240 cellSpacing=0 cellPadding=0 width=549 border=0><!--关于TBODY标记-->

<TBODY style="DISPLAY: block">

<TR>

<TD vAlign=top align=middle><BR><BR>

<TABLE cellSpacing=0 cellPadding=0 width=490 border=0>

<TBODY>

<TR>

<TD>指定行做为表体。

<BR>注释:TBODY要素是块要素,并且需要结束标

签。<BR>即使如果表格没有显式定义TBODY

要素,该要素也提供给所有表。<BR><BR>

参考:《动态HTML参考和开发应用大全》(人民邮电出

版社

Microsoft Corporation著

北京华中兴业科技发展有限公司

译)

<BR><BR></TD></TR></TB

ODY></TABLE></TD></TR></T

BODY><!--关于cells集合-->

<TBODY style="DISPLAY:

none">

<TR>

<TD vAlign=top

align=middle><BR><BR>

<TABLE cellSpacing=0

cellPadding=0 width=490 border=0>

<TBODY>

<TR>

<TD>检索表行或者整个

表中所有单元格的集合。<BR>应用于TR、TABLE。

<BR><BR>参考:《动态HTML参考和开发应

用大全》(人民邮电出版社

Microsoft Corporation著

北京华中兴业科技发展有限公司

译)

<BR><BR></TD></TR></TB

ODY></TABLE></TD></TR></T

BODY><!--关于tBodies集合-->

<TBODY style="DISPLAY:

none">

<TR>

<TD vAlign=top

align=middle><BR><BR>

<TABLE cellSpacing=0

cellPadding=0 width=490 border=0>

<TBODY>

<TR>

<TD>检索表中所有TBODY

对象的集合。对象在该集合中按照HTML源顺序排列。

<BR>应用于TABLE。<BR><BR>参考:

《动态HTML参考和开发应用大全》(人民邮电出版社

Microsoft Corporation著

北京华中兴业科技发展有限公司

译)

<BR><BR></TD></TR></TB

ODY></TABLE></TD></TR></T

BODY><!--关于display属性-->

<TBODY style="DISPLAY:

none">

<TR>

<TD vAlign=top

align=middle><BR><BR>

<TABLE cellSpacing=0

cellPadding=0 width=490 border=0>

<TBODY>

<TR>

<TD>设置或者检索对象

是否被提供。<BR>可能的值为block、none、

inline、list-item、table-header-group、table-

footer-group。<BR>该特性可读写,块要素默认

值为block,内联要素默认值为inline;层叠样式表

(CSS)属性不可继承。<BR><BR>参考:《

动态HTML参考和开发应用大全》(人民邮电出版社

Microsoft Corporation著

北京华中兴业科技发展有限公司译)

<BR><BR><A

rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target=_blank>点击此处

</A>可参阅微软<A rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target=_blank>MSDN在线</A>上的解释。

</TD></TR></TBODY></TABLE>

;</TD></TR></TBODY></TABLE&g

t;</body>

</html>

这里跟上面不同的区别在与这是鼠标移动和滑动的事件区别!

第三个:仿拍拍的切换效果菜单(里面的图片是我放上去的,所以会看不到图片的,呵呵继续)

<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""">

<html xmlns="" lang="zh-CN">

<head>

<meta http-equiv="Content-Language" content="zh-cn"/>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>

<meta name="robots" content="all"/>

<title>网页特效|网页特效代码(JsHtml.cn)---仿拍拍paipai.com首页产品图片随机轮显切换效果</title><style>

body{font-size:12px}

img{border:0px}

#sale{right:206px;top:0;width:260px;background:#fff}

#saleTitle{text-align:right;padding-top:5px;padding-right:5px;width:255px;height:20px;background:url("images/saleTitle.gif") no-repeat}

#saleList{margin-top:5px}

#saleList.saleTwo{height:108px;background:url("images/salelineH.gif") bottom repeat-x;}

#saleList a{display:block;height:108px;width:86px;text-align:center;float:left;overflow:hidden}

#saleList a.saleItem{background:url("images/salelineV.gif") right repeat-y;}

#saleList a img{margin:5px 0}

#saleList a:hover{background-color:#EBFFC5}

</style>

<script type="text/javascript">

rnd.today=new Date();

rnd.seed=rnd.today.getTime();

function rnd(){

rnd.seed=(rnd.seed*9301+49297)% 233280;

return rnd.seed/(233280.0);

}

function rand(number){

return Math.ceil(rnd()*number)-1;

}

function nextSale(order){

if(order=="up") saleNum--;

else saleNum++;

if(saleNum>2) saleNum=0

else if(saleNum<0) saleNum=2;

//alert(saleNum);

for(i=0;i<3;i++)

document.getElementById("saleList"+i).style.display="none";

document.getElementById("saleList"+saleNum).style.display="";

}

</script>

</head>

<body>

<div id="sale" class="absolute overflow">

<div id="saleTitle" class="absolute">

<a rel="external nofollow" href="javascript:nextSale('up')" title="点击到上一屏">

<img src="images/saleFore.gif" hspace="4" onmouseover="this.src='images/saleForeOver.gif'" onmouseout="this.src='images/saleFore.gif'"/></a><a rel="external nofollow" href="javascript:nextSale('down')" title="点击到下一屏"><img src="images/saleNext.gif" onmouseover="this.src='images/saleNextOver.gif'" onmouseout="this.src='images/saleNext.gif'"/></a></div>

<div class="overflow" style="height:330px" id="saleList">

<script type="text/javascript">var saleNum=rand(3);</script>

<div id="saleList0" style="display:none">

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="圣诞浪漫饰品超级大促" src="/jsimages/UploadFiles_3321/200804/20080423085515804.jpg" width="65" height="65"/></div>

<div>

圣诞浪漫饰品<br/>

超级大促</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="摄像头集结号给你新的感觉" src="/jsimages/UploadFiles_3321/200804/20080423085516472.jpg" width="65" height="65"/></div>

<div>

摄像头集结号<br/>

给你新的感觉</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="好感度提升韩版娃娃装" src="/jsimages/UploadFiles_3321/200804/20080423085516162.jpg" width="65" height="65"/></div>

<div>

好感度提升<br/>

韩版娃娃装</div>

</a></div>

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="复古牛仔外套特惠119元起" src="/jsimages/UploadFiles_3321/200804/20080423085516293.jpg" width="65" height="65"/></div>

<div>

复古牛仔外套<br/>

特惠119元起</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="圣诞拍拍特供运动服3折" src="/jsimages/UploadFiles_3321/200804/20080423085516802.jpg" width="65" height="65"/></div>

<div>

圣诞拍拍特供<br/>

运动服3折</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="摄像头集结号给你新的感觉" src="/jsimages/UploadFiles_3321/200804/20080423085516472.jpg" width="65" height="65"/></div>

<div>

摄像头集结号<br/>

给你新的感觉</div>

</a></div>

<div>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="圣诞拍拍特供电脑周边4折" src="/jsimages/UploadFiles_3321/200804/20080423085516530.jpg" width="65" height="65"/></div>

<div>

圣诞拍拍特供<br/>

电脑周边4折</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="party扮靓甜美腮红" src="/jsimages/UploadFiles_3321/200804/20080423085516658.jpg" width="65" width="65" height="65"/></div>

<div>

party扮靓<br/>

甜美腮红</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="好感度提升韩版娃娃装" src="/jsimages/UploadFiles_3321/200804/20080423085516162.jpg" width="65" height="65"/></div>

<div>

好感度提升<br/>

韩版娃娃装</div>

</a></div>

</div>

<div id="saleList1" style="display:none">

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="新奇好玩便宜尽在网游频道" src="/jsimages/UploadFiles_3321/200804/20080423085516612.jpg" width="65" height="65"/></div>

<div>

新奇好玩便宜<br/>

尽在网游频道</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="展现高贵气质骑士系马靴" src="/jsimages/UploadFiles_3321/200804/20080423085516202.jpg" width="65" height="65"/></div>

<div>

展现高贵气质<br/>

骑士系马靴</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="摄像头集结号给你新的感觉" src="/jsimages/UploadFiles_3321/200804/20080423085516472.jpg" width="65" height="65"/></div>

<div>

摄像头集结号<br/>

给你新的感觉</div>

</a></div>

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="永不过时条纹毛衣" src="/jsimages/UploadFiles_3321/200804/20080423085516984.jpg" width="65" height="65"/></div>

<div>

永不过时<br/>

条纹毛衣</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="圣诞拍拍特供运动鞋2折" src="/jsimages/UploadFiles_3321/200804/20080423085516651.jpg" width="65" height="65"/></div>

<div>

圣诞拍拍特供<br/>

运动鞋2折</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="好感度提升韩版娃娃装" src="/jsimages/UploadFiles_3321/200804/20080423085516162.jpg" width="65" height="65"/></div>

<div>

好感度提升<br/>

韩版娃娃装</div>

</a></div>

<div>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="精简唯美索爱K630" src="/jsimages/UploadFiles_3321/200804/20080423085516302.jpg" width="65" height="65"/></div>

<div>

精简唯美<br/>

索爱K630</div>

</a>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="原装瑞士军刀精选" src="/jsimages/UploadFiles_3321/200804/20080423085516549.jpg" width="65" width="65" height="65"/></div>

<div>

原装瑞士军刀<br/>

精选</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="超薄机身索爱W880" src="/jsimages/UploadFiles_3321/200804/20080423085516711.jpg" width="65" height="65"/></div>

<div>

超薄机身<br/>

索爱W880</div>

</a></div>

</div>

<div id="saleList2" style="display:none">

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="各就各味秋冬饮食计划" src="/jsimages/UploadFiles_3321/200804/20080423085516704.jpg&type=3" width="65" height="65"/></div>

<div>

各就各味<br/>

秋冬饮食计划</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="好感度提升韩版娃娃装" src="/jsimages/UploadFiles_3321/200804/20080423085516162.jpg" width="65" height="65"/></div>

<div>

好感度提升<br/>

韩版娃娃装</div>

</a></div>

<div class="saleTwo">

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="圣诞拍拍特供随身视听5折" src="/jsimages/UploadFiles_3321/200804/20080423085516375.jpg" width="65" height="65"/></div>

<div>

圣诞拍拍特供<br/>

随身视听5折</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="超薄机身索爱W880" src="/jsimages/UploadFiles_3321/200804/20080423085516711.jpg" width="65" height="65"/></div>

<div>

超薄机身<br/>

索爱W880</div>

</a></div>

<div>

<a class="saleItem" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="我爱我家家居大抢购" src="/jsimages/UploadFiles_3321/200804/20080423085516954.jpg" width="65" height="65"/></div>

<div>

我爱我家<br/>

家居大抢购</div>

</a><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="" target="_blank">

<div>

<img alt="超值彩妆套装变身派对女王" src="/jsimages/UploadFiles_3321/200804/20080423085516919.jpg" width="65" width="65" height="65"/></div>

<div>

超值彩妆套装<br/>

变身派对女王</div>

</a></div>

</div>

</div>

</div>

<script type="text/javascript">document.getElementById("saleList"+saleNum).style.display="";</script>

<p></p>

<p>更多网页特效代码尽在<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="">网页特效代码</a></p>

</body>

</html>

这个仿拍拍基本上就是2层放图片,但用起来的效果还是可以的,如果不喜欢我还有下面呢,慢慢学,总会看懂的(最重要的还是Css哦)

这个主要就是让层实现隐藏我觉得这个在层使用方面还是好的

从总体上看,在实现层与层之间的交互,在其代码我觉得你有必要去认真看下!

以上是我介绍额度菜单,虽然不是很强大,但是却很使用,而且在J2EE中

菜单基本上是一个假象,都是用层与Css之间的特效做出来的!

学会了层的具体应用,我相信你也可以有自己特色的菜单的

那我祝你好运咯!!加油!!

javascript简单代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于在javascript中、javascript简单代码的信息别忘了在本站进行查找哦。

jquery插件库有哪些?javascript插件数据编程?数据库编程软件