JS按钮特效源码Word文档下载推荐.docx
《JS按钮特效源码Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《JS按钮特效源码Word文档下载推荐.docx(19页珍藏版)》请在冰豆网上搜索。
在此能够设置打开窗口的宽度、高度-->
--[Step5]:
这里可以更改打开窗口的位置-->
inputtype="
button"
name="
Input"
value="
263在线"
onClick="
window.open('
'
Sample'
'
toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=490,height=320,left=10,top=10'
)"
--案例代码结束-->
/BODY>
/HTML>
2打开全屏窗口
按钮特效篇--打开全屏窗口<
--案例代码1开始-->
scriptlanguage=JavaScript>
functionOpenAllWindow(){
这里可以设置按钮对应的网页地址-->
vartargeturl="
在此能够设置打开窗口的各种参数-->
NewWindow=window.open("
"
"
scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes"
)
if(document.all){NewWindow.moveTo(0,0);
NewWindow.resizeTo(screen.width,screen.height)}
NewWindow.location=targeturl
}
/script>
--案例代码1结束-->
--案例代码2开始-->
这里可以更改按钮的名称-->
OpenAllWindow()"
--案例代码2结束-->
3随意打开窗口
按钮特效篇--随意打开窗口<
functionCustomizeWindow(form){
varaddress=document.form1.url.value;
varop_wid=document.form1.wid.value;
varop_heigh=document.form1.heigh.value;
varop_resize=(document.form1.resize.checked==true)?
1:
0;
varop_dir=(document.form1.dir.checked==true)?
varop_stat=(document.form1.stat.checked==true)?
varop_menu=(document.form1.menu.checked==true)?
varop_tool=(document.form1.tool.checked==true)?
varop_loc_box=(document.form1.loc_box.checked==true)?
varop_scroll=(document.form1.scroll.checked==true)?
varoption="
toolbar="
+op_tool+"
directories="
+op_dir+"
location="
+op_loc_box+"
status="
+op_stat+"
scrollbars="
+op_scroll+"
resizeable="
+op_resize+"
menubar="
+op_menu+"
width="
+op_wid+"
height="
+op_heigh;
varwin3=window.open("
"
how_are_u_doing"
option);
varwin4=window.open(address,"
);
functionClearWindow(form){
document.form1.wid.value="
;
document.form1.heigh.value="
<
formname="
form1"
action="
javascript:
method="
post"
div>
这里可以设置表格的边界框,数值大边框粗-->
tablewidth="
100%"
border="
2"
在此能够修改表格内容的对齐方式-->
tralign=center>
这里可以更改页面的提示信息-->
tdcolspan="
4"
height="
35"
地址:
在此能够修改地址栏的列长度-->
text"
size=40name="
url"
http:
//"
/td>
/tr>
tralign="
center"
tdwidth="
25%"
25"
checkbox"
tool"
ON"
:
快捷键
loc_box"
地址栏
<
dir"
链接
stat"
状态栏
resize"
调大小
<
scroll"
滚动条
menu"
菜单
宽度:
wid"
size="
10"
高度:
heigh"
确认"
CustomizeWindow(this.form)"
reset"
取消"
ClearWindow(this.form)"
/table>
/div>
/form>
4返回默认首页
按钮特效篇--返回默认首页<
functionReturnHomePage(){
if(document.layers)window.home()
这里可以设置默认首页的网址-->
elsewindow.location="
form>
在此能够更改按钮的名称-->
返回默认首页"
ReturnHomePage()"
5按频道打开窗口
按钮特效篇--按频道打开窗口<
scriptlanguage=Javascript>
functionChannelWindow(){
这里可以设置打开窗口的网页地址-->
window.open("
ChannelWindow()"
6显示特殊效果
按钮特效篇--显示特殊效果<
styletype="
text/css"
这里能够更改按钮显示的颜色和背景色-->
在此可以设置按钮的字体-->
.down{color:
#FF99FF;
background:
#333300;
font-style:
italic}
.over{color:
#99FF66;
#CC00CC}
/style>
这里能够修改按钮的名称-->
Button"
按钮的特殊效果"
onMouseOver="
this.className='
over'
onMouseDown="
down'
onMouseUp="
onMouseOut="
'
7站点栏目跑马灯
按钮特效篇--站点栏目跑马灯<
if(!
document.layers&
&
document.all)event="
test"
functionShowTip(current,e,text){
if(document.all&
document.readyState=="
complete"
){
document.all.ShowHideTip.innerHTML='
marqueestyle="
border:
1pxsolidblack"
+text+'
/marquee>
document.all.ShowHideTip.style.pixelLeft=event.clientX+document.body.scrollLeft+10
document.all.ShowHideTip.style.pixelTop=event.clientY+document.body.scrollTop+10
document.all.ShowHideTip.style.visibility="
visible"
elseif(document.layers){
document.ShowHideTip.document.nstip.document.write('
b>
/b>
document.ShowHideTip.document.nstip.document.close()
document.ShowHideTip.document.nstip.left=0
currentscroll=setInterval("
ScrollTip()"
100)
document.ShowHideTip.left=e.pageX+10
document.ShowHideTip.top=e.pageY+10
document.ShowHideTip.visibility="
show"
functionScrollTip(){
if(document.ShowHideTip.document.nstip.left>
=-document.ShowHideTip.document.nstip.document.width)
document.ShowHideTip.document.nstip.left-=5
else
document.ShowHideTip.document.nstip.left=150
functionHideTip(){
if(document.all)
hidden"
clearInterval(currentscroll)
这里可以更改跑马灯的矩形框大小-->
在此能够设置矩形框的背景色-->
divid="
ShowHideTip"
style="
position:
absolute;
visibility:
hidden;
clip:
rect(0150500);
width:
150px;
background-color:
#66FF00"
table>
tr>
在此能够设置页面站点信息对应的网址-->
这里可以修改页面站点的跑马灯信息-->
td>
inputname=buttontype=buttonvalue="
263在线"
ShowTip(this,event,'
263在线__中国人的网上家园!
HideTip()"
新浪网"
全球最大华人网站!
搜狐网"
中国互联网第一品牌!
雅虎网"
雅虎中国:
力争找到任何事,沟通所有人!
8窗口开关
按钮特效篇--窗口开关<
functionOpenWindow(){
这里可以设置窗口打开的网址-->
onewindow=open('
NewWindow'
functionCloseWindow(){
onewindow.close();
open"
打开263在线"
OpenWindow()"
close"
关闭263在线"
CloseWindow()"
9说明浮动条