

个非常漂亮的下拉列表框
function DDLI_onmousemove()
{ window.event.cancelBubble = true
}
function DDLI_onmouseover(item)
{ item.style.color = DDL_HFC
item.style.backgroundColor = DDL_HBC
}
function DDLI_onmouseout(item)
{ item.style.color = DDL_FGC
item.style.backgroundColor = DDL_BGC
}
function DDLI_onclick(item)
{ hDDL.innerText = item.innerText
DDL.style.display = "none"
alert("You click " + item.innerText + "!")
}
function document_onmousemove()
{ DDL.style.display = "none"
}
function DDL_onmousemove()
{ window.event.cancelBubble = true
}
function hDDL_onclick()
{ DDL.style.posLeft = hDDL.offsetLeft
DDL.style.posTop = hDDL.offsetTop + hDDL.offsetHeight
DDL.style.display = "block"
}
function writeDropdownList()
{
document.write("document.write(" style="BACKGROUND-COLOR: " + DDL_BGC + ";")
document.write(" BORDER-BOTTOM: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-LEFT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-RIGHT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-TOP: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" PADDING-LEFT: 10px; COLOR: " + DDL_FGC + ";")
document.write(" CURSOR: hand; POSITION: absolute;")
document.write(" LEFT: " + DDL_Left + "; TOP: " + DDL_Top + "; WIDTH: " + DDL_Width + """)document.write(" LANGUAGE="javascript"")
document.write(" ")
document.write(" >")
document.write(DropdownListData[0] + "")
document.write("document.write(" BACKGROUND-IMAGE: url(imageDDLpic.gif); CURSOR: hand;")document.write(" POSITION: absolute; TOP: " + (DDL_Top + DDL_BW) + ";")document.write(" LEFT: " + (DDL_Left + DDL_Width - DDL_BW - DDL_picW) + ";")document.write(" WIDTH: " + DDL_picW + ";")
document.write(" BACKGROUND-REPEAT: no-repeat"")
document.write(" LANGUAGE="javascript"")
document.write(" ")
document.write(" >")
document.write("")
document.write("document.write(" style ="BACKGROUND-COLOR: " + DDL_BGC + ";") } document.onmousemove = document_onmousemove var DropdownListData = new Array() var DDL_BGC = "papayawhip" DropdownListData[0] = "Item0" writeDropdownList() LANGUAGE=javascript 下拉列表框演示程序: softet function nocontextmenu() return false; function norightclick(e) } document.oncontextmenu = nocontextmenu; // for IE5+ 在对话框中的Attribute选项的下拉列表中选HTTP-equivalent选项,在Value:中键入Page-Enter,表示进入网页时有网页过渡效果。在Content:中键入Revealtrans(Duration=6,Transition=2),Duration=6表示网页过渡效果的延续时间为6秒,Transition表示过渡效果方式,值为2时表示圆形收缩。 效果 Content Transitionv var gourl = setInterval("downtimes()",1000); 然后把 function DDLI_onmousemove() function DDLI_onmouseover(item) function DDLI_onmouseout(item) function DDLI_onclick(item) function document_onmousemove() function DDL_onmousemove() function hDDL_onclick() function writeDropdownList() document.write("document.write(" style="BACKGROUND-COLOR: " + DDL_BGC + ";") document.write(DropdownListData[0] + "") document.write("document.write(" BACKGROUND-IMAGE: url(imageDDLpic.gif); CURSOR: hand;")document.write(" POSITION: absolute; TOP: " + (DDL_Top + DDL_BW) + ";")document.write(" LEFT: " + (DDL_Left + DDL_Width - DDL_BW - DDL_picW) + ";")document.write(" WIDTH: " + DDL_picW + ";") document.write(" BACKGROUND-REPEAT: no-repeat"") document.write("document.write(" style ="BACKGROUND-COLOR: " + DDL_BGC + ";") } document.onmousemove = document_onmousemove var DropdownListData = new Array() var DDL_BGC = "papayawhip" DropdownListData[0] = "Item0" writeDropdownList() LANGUAGE=javascript 下拉列表框演示程序:
document.write(" BORDER-BOTTOM: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-LEFT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-RIGHT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-TOP: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" DISPLAY: none; POSITION: absolute;")
document.write(" LEFT: 10px; HEIGHT: 99px; TOP: 124px; WIDTH: " + DDL_Width + """)document.write(" LANGUAGE="javascript"")
document.write(" >")
var i
for(i=0; i
document.write(" + i + ")"")document.write(" + i + ")"")
document.write(" + i + ")"")
document.write(" >")
document.write(DropdownListData + "
")
} document.write("")
var DDL_FGC = "green"
var DDL_HBC = "orange"
var DDL_HFC = "red"
var DDL_BC = "red"
var DDL_BW = 1
var DDL_Width = 90
var DDL_Top = 100
var DDL_Left = 80
var DDL_picW = 15
DropdownListData[1] = "Item1"
DropdownListData[2] = "Item2"
DropdownListData[3] = "Item3"
DropdownListData[4] = "Item4"
>
鼠标右键绝对禁止法
if (window.Event)
document.captureEvents(Event.MOUSEUP);
{ event.cancelBubble = true
event.returnValue = false;
}
{ if (window.Event)
{ if (e.which == 2 || e.which == 3)
return false;
} else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
document.onmousedown = norightclick; // for all others
//-->
script>
Dreamweaver定制网页过渡功能:
首先用Dreamweaver打开页面,然后单击菜单中的Insert\Head\Meta(插入/文件头标签/Meta).
输入完后单击确定,存盘。这样当我们点击一个超链接进入这个页面时就可以看到效果了。另外还有二十多种效供你选择,只要将Transition的值改为相应的效果的代号即可,具体效果和设置如下表所示:
盒状收缩 RevealTrans 0
盒状展开 RevealTrans 1
圆形收缩 RevealTrans 2
圆形展开 RevealTrans 3
向上擦除 RevealTrans 4
向下擦除 RevealTrans 5
向左擦除 RevealTrans 6
向右擦除 RevealTrans 7
垂直百页窗 RevealTrans 8
水平百页窗 RevealTrans 9
横向棋盘式 RevealTrans 10
纵向棋盘式 RevealTrans 11
溶解 RevealTrans 12
左右向中部收缩 RevealTrans 13
中部向左右展开 RevealTrans 14
上下向中部收缩 RevealTrans 15
中部向上下展开 RevealTrans 16
阶梯状向左下展开 RevealTrans 17
阶梯状向左上展开 RevealTrans 18
阶梯状向右下展开 RevealTrans 19
阶梯状向右上展开 RevealTrans 20
随机水平线 RevealTrans 21
随机垂直线 RevealTrans 22
随机 RevealTrans 23
加到文字中间,以显示倒计时。
var url = "html/index.html"; {'html/index.html'为转到页面}
var loctime = 9; {9=9秒}
timedown.innerhtml = loctime;
function downtimes(){
loctime--;
timedown.innerHTML= loctime;
if(loctime <= 0){
clearInterval(gourl);
window.location = url;
}
}
script>
又一个一个非常漂亮的下拉列表框
function getSelected()
{ return hDDL.innerText
} function hDDL_onmousemove()
{ window.event.cancelBubble = true
}
{ window.event.cancelBubble = true
}
{ item.style.color = DDL_HFC
item.style.backgroundColor = DDL_HBC
}
{ item.style.color = DDL_FGC
item.style.backgroundColor = DDL_BGC
}
{ hDDL.innerText = item.innerText
DDL.style.display = "none"
alert("You click " + item.innerText + "!")
}
{ DDL.style.display = "none"
}
{ window.event.cancelBubble = true
}
{ DDL.style.posLeft = hDDL.offsetLeft
DDL.style.posTop = hDDL.offsetTop + hDDL.offsetHeight
DDL.style.display = "block"
}
{
document.write(" BORDER-BOTTOM: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-LEFT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-RIGHT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-TOP: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" PADDING-LEFT: 10px; COLOR: " + DDL_FGC + ";")
document.write(" CURSOR: hand; POSITION: absolute;")
document.write(" LEFT: " + DDL_Left + "; TOP: " + DDL_Top + "; WIDTH: " + DDL_Width + """)document.write(" LANGUAGE="javascript"")
document.write(" ")
document.write(" >")
document.write(" LANGUAGE="javascript"")
document.write(" ")
document.write(" >")
document.write("")
document.write(" BORDER-BOTTOM: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-LEFT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-RIGHT: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" BORDER-TOP: " + DDL_BC + " " + DDL_BW + " solid;")
document.write(" DISPLAY: none; POSITION: absolute;")
document.write(" LEFT: 10px; HEIGHT: 99px; TOP: 124px; WIDTH: " + DDL_Width + """)document.write(" LANGUAGE="javascript"")
document.write(" >")
var i
for(i=0; i
document.write(" + i + ")"")document.write(" + i + ")"")
document.write(" + i + ")"")
document.write(" >")
document.write(DropdownListData + "
")
} document.write("")
var DDL_FGC = "green"
var DDL_HBC = "orange"
var DDL_HFC = "red"
var DDL_BC = "red"
var DDL_BW = 1
var DDL_Width = 90
var DDL_Top = 100
var DDL_Left = 80
var DDL_picW = 15
DropdownListData[1] = "Item1"
DropdownListData[2] = "Item2"
DropdownListData[3] = "Item3"
DropdownListData[4] = "Item4"
>
