当前位置: 网学 > 网络学习 > Dreamweaver教程 > 正文

Dreamweaver常用代码

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/09

【编者按】网学网Dreamweaver教程频道为大家收集整理了“Dreamweaver常用代码“提供大家参考,希望对大家有所帮助!

1.控制横向和纵向滚动条的显隐?
<body style="overflow-y:hidden"> 去掉x轴
<body style="overflow-x:hidden"> 去掉y轴
<body scroll="no">不显

--------------------------------------------------------------------------------
 2.表格变色
<TD onmouseover="this.style.backgroundColor=''#FFFFFF''"
onmouseout="this.style.backgroundColor=''''"
style="CURSOR: hand">
--------------------------------------------------------------------------------
 3.禁止复制,鼠标拖动选取
<body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false>
--------------------------------------------------------------------------------
 4.普通iframe页面
<iframe name="name" src="main.htm" width="450" height="287" scrolling="Auto" frameborder="0"></iframe>

--------------------------------------------------------------------------------
 5.iframe自适应高度
<iframe name="pindex" src="index.asp" frameborder=false scrolling="auto" width="100%" height="100%" frameborder=no onload="document.all[''pindex''].style.height=pindex.document.body.scrollHeight" ></iframe>
--------------------------------------------------------------------------------
 6.IE地址栏前换成自己的图标&可以在收藏夹中显示出你的图标
<link rel="Shortcut Icon" href="favicon.ico">
<link rel="Bookmark" href="favicon.ico">
--------------------------------------------------------------------------------
 7.字号缩放
越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。
<script type="text/javascript">
function doZoom(size)
{document.getElementById(''zoom'').style.fontSize=size+''px'';}
</script>
<span id="zoom">需要指定大小的文字</span>
<a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a>
--------------------------------------------------------------------------------
 8.简单的跳转网页代码
如果你要让页面显示3秒钟之后跳转,可以在html代码的<head></head>部分加上这样的代码:
<meta http-equiv="refresh" content="3; url=http://www.devdao.com">
--------------------------------------------------------------------------------
 9.iframe(嵌入式帧)自适应高度
填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料
<iframe name="guestbook" src="gbook/index.asp" scrolling=no width="100%" height="100%" frameborder=no onload="document.all[''guestbook''].style.height=guestbook.document.body.scrollHeight"></iframe>
--------------------------------------------------------------------------------
 10.跳转菜单新窗口
<select name="select" onchange="window.open(this.options[this.selectedIndex].value)">
<option value="http://www.microsoft.com/ie"> Internet Explorer</option>
<option value="http://www.microsoft.com"> Microsoft Home</option>
&

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号