Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx

上传人:b****5 文档编号:16138748 上传时间:2022-11-20 格式:DOCX 页数:51 大小:125.82KB
下载 相关 举报
Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx_第1页
第1页 / 共51页
Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx_第2页
第2页 / 共51页
Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx_第3页
第3页 / 共51页
Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx_第4页
第4页 / 共51页
Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx_第5页
第5页 / 共51页
点击查看更多>>
下载资源
资源描述

Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx

《Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx(51页珍藏版)》请在冰豆网上搜索。

Dreamweaver通俗易懂的常用代码Word文档下载推荐.docx

287"

scrolling="

Auto"

frameborder="

0"

/iframe>

5.iframe自适应高度

pindex"

index.asp"

frameborder=falsescrolling="

auto"

100%"

frameborder=no>

6.IE地址栏前换成自己的图标&

可以在收藏夹中显示出你的图标

linkrel="

ShortcutIcon"

href="

favicon.ico"

Bookmark"

7.字号缩放

越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。

scripttype="

text/javascript"

functiondoZoom(size)

{document.getElementById('

zoom'

).style.fontSize=size+'

px'

;

}

/script>

spanid="

zoom"

需要指定大小的文字<

/span>

ahref="

javascript:

doZoom(16)"

大<

/a>

<

doZoom(14)"

中<

doZoom(12)"

小<

8.简单的跳转网页代码

如果你要让页面显示3秒钟之后跳转,可以在html代码的<

head>

/head>

部分加上这样的代码:

metahttp-equiv="

refresh"

content="

3;

url="

9.iframe(嵌入式帧)自适应高度

填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!

”。

对跨域引用有权限问题,请查阅其他资料。

guestbook"

gbook/index.asp"

scrolling=nowidth="

10.跳转菜单新窗口

selectname="

select"

>

optionvalue="

InternetExplorer<

/option>

"

MicrosoftHome<

DeveloperNetwork<

/select>

11.flash透明选项

paramname="

wmode"

value="

transparent"

12.添加到收藏夹和设为首页

ahref=#>

设为首页<

window.external.AddFavorite('

13.记录并显示网页的最后修改时间

scriptlanguage=JavaScript>

document.write("

最后更新时间:

"

+document.lastModified+"

14.节日倒计时

ScriptLanguage="

JavaScript"

vartimedate=newDate("

October1,2002"

);

vartimes="

国庆节"

varnow=newDate();

vardate=timedate.getTime()-now.getTime();

vartime=Math.floor(date/(1000*60*60*24));

if(time>

=0)

document.write("

现在离"

+times+"

还有:

+time+"

天"

/Script>

15.加在HEAD里

禁止缓存

Expires"

CONTENT="

Cache-Control"

no-cache"

Pragma"

16.让IFRAME框架内的文档的背景透明

iframesrc="

about:

bodystyle='

background:

transparent'

allowtransparency>

17.打开窗口即最大化

scriptlanguage="

!

--Beginself.moveTo(0,0)

self.resizeTo(screen.availWidth,screen.availHeight)

//End-->

18.加入背景音乐

bgsoundsrc="

mid/windblue[1].mid"

loop="

-1"

只适用于IE

embedsrc="

music.mid"

autostart="

true"

hidden="

对Netscape,IE都适用

19.滚动

marqueedirection=upheight=146onmouseout=start()onmouseover=stop()scrollAmount=2>

滚动信息

/marquee>

20.防止点击空链接时,页面往往重置到页首端

代码“javascript:

void(null)”代替原来的“#”标记

21.文字或图片弹出指定大小的窗口

在body中加入

type="

text/JavaScript"

functionMM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);

弹出代码

#"

target="

_self"

550"

380"

border="

图片或文字<

22.跳转页面代码

5;

url="

23.细线分隔线

hrnoshadesize=0color=#C0C0C0>

24.网页中的自动换行

tdstyle="

word-break:

break-all"

就搞定了。

完整的是

table-layout:

fixed;

WORD-BREAK:

break-all;

WORD-WRAP:

break-word"

25.消除ie6自动出现的图像工具栏,设置GALLERYIMG属性为false或no.

IMGSRC="

HEIGHT="

100px"

WIDTH="

GALLERYIMG="

26.禁止页面正文内容被选取

bodyoncontextmenu="

returnfalse"

ondragstart="

onselectstart="

onselect="

document.selection.empty()"

oncopy="

onbeforecopy="

27.不能点右键,不用CTRL+A,不能复制作!

window.event.returnValue=false"

onkeypress="

onkeyup="

onselectstart="

event.returnValue=false"

/body>

28.IE浏览器支持一个Body属性bgproperties,它可以让背景不滚动:

BodyBackground="

图片文件"

bgproperties="

fixed"

29.随机变换背景图象(一个可以刷新心情的特效)

image=newArray(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("

BODYBACKGROUND="

+image[number]+"

30.图片表单按钮

formid="

form1"

name="

method="

post"

action="

imgsrc="

62"

22"

/>

/form>

31.左右阴影背景的CSS定义方法

body{

text-align:

center;

background-repeat:

repeat-y;

background-position:

center;

background-image:

url(../images/bg.jpg);

32.划过链接手型鼠标

cursor:

hand"

33.如何关闭层

divid="

Layer1"

/div>

关闭层<

34.关闭窗口的脚本

ahref=javascript:

close()>

[关闭

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 中考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1