当前位置: 主页 > 网页制作 > Dreamweaver > 常用Dreamweaver代码

常用Dreamweaver代码

时间:2009-11-30来源:图片处理网 点击:

t="_self" onClick="MM_openBrWindow(‘windows01.htm‘,‘‘,‘width=550,height=380‘)" width="550" height="380" border="0">图片或文字</a>


--------------------------------------------------------------------------------
 22.跳转页面代码
<meta http-equiv="refresh" content="5;url=http://www.devdao.com">
--------------------------------------------------------------------------------
 23.细线分隔线
<hr noshade size=0 color=#C0C0C0>
--------------------------------------------------------------------------------
 24.网页中的自动换行
<td style="word-break:break-all">就搞定了。
完整的是
style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word"
--------------------------------------------------------------------------------
 25.消除ie6自动出现的图像工具栏,设置 GALLERYIMG属性为false或no .
<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">
--------------------------------------------------------------------------------
 26.禁止页面正文内容被选取
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return
false"onmouseup="document.selection.empty()">

--------------------------------------------------------------------------------
 27.不能点右键,不用CTRL+A,不能复制作!
<body oncontextmenu="window.event.returnValue=false"
onkeypress="window.event.returnValue=false"
onkeydown="window.event.returnValue=false"
onkeyup="window.event.returnValue=false"
ondragstart="window.event.returnValue=false"
onselectstart="event.returnValue=false">
</body>
--------------------------------------------------------------------------------
 28.IE浏览器支持一个 Body 属性 bgproperties,它可以让背景不滚动:
<Body Background="图片文件" bgproperties="fixed">
--------------------------------------------------------------------------------
 29.随机变换背景图象(一个可以刷新心情的特效)
<Script Language="JavaScript">
   image = new Array(4); //定义image为图片数量的数组
   image [0] = ‘tu0.gif‘ //背景图象的路径
   image [1] = ‘tu1.gif‘
   image [2] = ‘tu2.gif‘
   image [3] = ‘tu3.gif‘
   image [4] = ‘tu4.gif‘
   number = Math.floor(Math.random() * image.length);
   document.write("<BODY BACKGROUND="+image[number]+">");
</Script>

--------------------------------------------------------------------------------
 30.图片表单按钮
<form id="form1" name="form1" method="post" action="">
<img src="login.gif" width="62" height="22" onclick="document.form1.submit()" />
</form>
--------------------------------------------------------------------------------
 31.左右阴影背景的CSS定义方法
body {
text-align:center;
background-repeat: repeat-y;
background-position: center;
background-image: url(../images/bg.jpg);
}
-----------------------------------


站长资讯网
.
分页: [1] [2] [3] [4] [5]
TAG: DREAMWEAVER 代码
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言