打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
HTTP常用代码
一、最常用的代码
1、文字加粗 倾斜的代码
◆文字加粗的代码是: <b>你好</b> ◆文字倾斜的代码是: <i>你好!</i> ◆底线字:<u></u>
2、文字链接代码
如果您想点击某处文字会连接到另外一个网页的效果,这是超链接,代码是这样:
<a href="http://www.stasp.com/index.asp";>网站制作指南</a>如果要点了这个文字以后重新打开一个窗口的话,代码是:<a href="网站地址";; target="_blank">九州在线</a>
3、在网站上放图片的代码
如果你看到一个好看的图片想放到网站上,代码是这样的:
<img src="http://www.stasp.com/siton.gif"; width="88" height="31">
后面的数字调节图片的尺寸大小。
4、图片链接代码
如果要点一下图片就能打开一个网站的链接代码是这样的:
<a href="http://www.stasp.com/index.asp";; target="_blank"><img src="http://www.123.com/images/n/163logo.gif"; width="150" height="100"></a>上面的数字都能调节图片尺寸大小。
只显示图片代码: <img border=0 src="图片地址" height=100 width=100>
5、换行代码
如果你想换行,直接用Enter键是不行的,需要在您想换行的位置输入<br>
,这样就会分成两行显示 ,整个网站看起来也不会是一大片了,而是段落分明。
6、移动文字
<marquee width="157" height="21">你想要的文字</marquee>
7、移动图片的代码
<marquee><img src="http://es.tom.com/images/2002/gamemm/0604/s/13.jpg";>
里面的图片地址自己定。
二、比较常用的代码
1. Flash代码 (写在日记内容里,或者在主页新模块的网址里) [代码中的Flash地址就是网上以.swf结尾的网址]
<embed src=’http://你的Flash地址’quality=high pluginspage=’http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash’ type=’application/x-shockwave-flash’ width=330 height=240></embed>
注意: width=330 height=240 这个是指在模板上插入的FLASH的大小。 width=是宽度 height=是高度 所有代码都是一样,可以自己修改下.
2. 背景音乐代码 (写在超级连接名称里) [代码中的音乐地址就是网上以.mp3/.midi/.wma/.wmv结尾的网址]
显示播放器: <EMBED src=http://你的音乐地址>
不显示播放器: <EMBED SRC=http://你的音乐地址 width="0" height="0" loop="true">
3. 视频MTV代码 (写在网址处~也就是URL地址的地方) [代码中的视频文件地址就是网上以.rm结尾的网址]
<embed SRC=你的视频文件地址 type=audio/x-pn-realaudio-plugin CONSOLE=Clip1
CONTROLS=ImageWindow HEIGHT=124 WIDTH=180 AUTOSTART=true loop=true>
↑高度 ↑宽度
还一个MTV代码也可用 <embed src=http://你的mtv地址> 这个只是不能调整大小.
4. 电台代码 [代码中的电台地址就是网上以.asp结尾的网址] (写在网址处就是URL地址处)
<embed SRC=你的电台地址 type=audio/x-pn-realaudio-plugin CONSOLE=Clip1 CONTROLS=ImageWindow HEIGHT=124 WIDTH=180 AUTOSTART=true loop=true>
例如: (随自己喜欢,一些DJ电台好玩哦!)
mms://220.191.131.206/jxyinyue
5. 移动公告<marquee style="color:#3333FF;font-size:12px;line-height:17px;" direction="up" height="50" scrollamount="1" scrolldelay="615" >歡迎光臨我的Q-ZONE
<br>又说什么.
<br>这里又说什么.
<br>还要说什么.
<br>哈哈,没有了,自己想添加多少可以复制多行就可以了~~!
<br>这样明白吗?
</td></marquee>
注:
direction="up" 将UP改为down就是下移动,左left,右right```
font-size:12px   字体大小
color:#3333FF    字体颜色 #333FF
6.移动友情连接代码,跟上面一样可以修改!
<marquee direction=up height=150 scrollamount=1 scrolldelay=60 width="100%">
<img border=0 src="图片地址1"><br>
<img border=0 src="图片地址2"><br>
<img border=0 src="图片地址3"><br>
<img border=0 src="图片地址4"><br>
</marquee>
需要加多少自己加吧! 滚动上下左右修改方法跟上面移动公告一样!
7.天气预报:
<iframe scrolling=YES height=288 width=222 frameborder=0 marginHeight=0 marginWidth=0 src=http://minisite.qq.com/Weather/index.html></iframe>
8. 音乐播放:
<iframe src=音乐地址 frameborder=0 width=100% height=34>
<embed src="http://www.6kyx.com/Music/lz.wma" hidden autostart="true" loop="true">
9.网页中加入背景音乐
IE: <bgsound src="*.mid" loop=infinite>
NS:<embed src="*.mid" autostart=true hidden=true loop=true>
10. 主页加flash时钟:
<EMBED pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash src="flash时钟网址" width=200 height=200 type=application/x-shockwave-flash></EMBED>
多种flash时钟地址:
http://www.fengzhuju.com/page-00s/wzgg/clocks.htm
11. 许愿代码:
<iframe src="http://free.ecaifly.com/wish/wish.asp?user=kjmdiba" width="450" height="350"></iframe>
12. 百度搜索: (大小都调好的,不错!)
<iframe border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" scrolling="no" width="140" height="75" src="http://unstat.baidu.com/bdun.bsc?tn=kjmdiba&csid=105&rkcs=0&bgcr=FFFFFF&ftcr=000000&rk=0&bd=1&bdas=0">
</iframe>
13. 主页滚动新闻:如 CCTV代码:
<table border=0 cellspacing=1 cellpadding=0 width=’98%’>
<td valign="top"><div align="center">
<iframe src="http://www.stasp.com/index.asp"; width="354" height="16" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
</div>
</table>
14. 日历代码:
<iframe src=http://www.stasp.com/index.asp width="600" height="600"></iframe>
大小自己改
15. 插入网页代码: (整个网站都可以,这个代码灵活运用的话是很好的~~)
<IFRAME frameBorder=0 height=600 marginHeight=0 marginWidth=0 scrolling=yes src="网页地址" width=800></IFRAME>
16. 设为首页代码:
<a style=cursor:hand
17. IP地址代码:
<iframe src="http://ip.91.com/ip/showip.asp?text=&bg=&line=2&scro=1&leng=140" frameborder="0" scrolling="no" width="160" height="36" marginheight="4" marginwidth="0"></iframe>
18. 星座占卜: 1
<iframe src="http://astro.qq.com/index/ladyastro.htm" width="200" height="320" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
星座占卜: 2
<iframe src="http://act1.astro.women.sohu.com/search/search.htm" width="200" height="320" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
19. 日历代码:
红色时间日历代码:
<iframe scrolling=no height=170 width=165 frameborder=0 marginHeight=0 marginWidth=0 src=http://home.id666.com/user/420009598/disk/webdisk/55.html></iframe>
蓝色时间日历代码:
<iframe scrolling=no height=200 width=180 frameborder=0 marginHeight=0 marginWidth=0 src=http://www.8s8s.com/js/htm/time/date1.htm></iframe>
20. 弹出窗口代码:
进入腾讯QQ空间主页:q-zone.qq.com,用自己的QQ号和密码登陆(注意:不要点击"进入我的空间")新建1个新窗口,在地址栏里输入 ("这里输入内容")</script> 然后按回车键,提示“修改成功”即可。
21. 时间代码1:
<IMG src="http://escati.linkopp.net/cgi-bin/clock.cgi?prgb=00ffff&timezone=GMT+0800" border="0" width="80" height="20">
时间代码2:
<iframe src="http://bjtime.cn/time/?color=ff0000&size=9pt&bg=ffffff&bold=0" width=200 height=20 frameborder=0></iframe>
参数说明:
color-字体颜色,默认为000000
size-字体大小,默认为18pt
bg-背景颜色,默认为ffffff
bold-是否粗体,1:是,0:不是,默认为1
width-显示区的宽度,请选择合适宽度
height-显示区的高度,请选择合适高度
时间代码3:
<embed src="http://biz.cnhoo.com/wz/test/top8.swf" quality="high" style="; left: 20 top: 6; width:675px; height:208px" ;; wmode="transparent">
22.显示日期
<script language="javascript"><!--
today=new Date();
var week; var date;
if(today.getDay()==0) week="星期日"
if(today.getDay()==1) week="星期一"
if(today.getDay()==2) week="星期二"
if(today.getDay()==3) week="星期三"
if(today.getDay()==4) week="星期四"
if(today.getDay()==5) week="星期五"
if(today.getDay()==6) week="星期六"
date=(today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"+" "
document.write("<span style=''font-size: 9pt;''>"+date+week+"</span>");
// -->
</script>
23.邮箱链接代码:
<a href="mailto:邮箱">邮箱名称</a>
邮箱如:ttt@163.com   邮箱名称可以是中文也可以是其它。
24:颜色代码
如果你想使用某种颜色,取得它的颜色值即可。比如,您想改变某些文字的颜色,您可以使用下面的代码:<font color=#ffc060 size=2>改变#符号后的代码即可改变颜色</font>
000000 000020 000040 000060 000080 0000a0 0000c0 0000ff
008000 008020 008040 008060 008080 0080a0 0080c0 0080ff
00ff00 00ff20 00ff40 00ff60 00ff80 00ffa0 00ffc0 00ffff
c00000 c00020 c00040 c00060 c00080 c000a0 c000c0 c000ff
ff0000
ff0020
ff0040
ff0060
ff0080
ff00a0
ff00c0
ff00ff
25:打开网站时候出现的欢迎词代码
<body 你好,欢迎访问本网站!")>
26:关闭网站的时候出现的话
<body 谢谢您的光临,诚邀加盟.请记住本站域名:http://www.yz126.com/ 站长信箱:****@yahoo.com.cn 欢迎咨询'')">
十三:打开网站的时候自己做一个弹出窗口的广告
<script language="javascript">
var TimerID=1;
window.open(''http://163.com','''',''width=600,height=300,left=100,top=50'');
</script>
里面的http://163.com 这个是你预先做好的一个网页,后面的数字是调节大小和位置的,你自己多试验几次。
十四:鼠标感应字体变红色的代码如下:插在<body></body>之间
<STYLE type=text/css>TD {
FONT-SIZE: 12px
}
BODY {
FONT-SIZE: 12px
}
INPUT {
FONT-SIZE: 12px
}
A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
A:active {
COLOR: blue; TEXT-DECORATION: none
}
A:hover {
COLOR: red; TEXT-DECORATION: underline
} .so {
BORDER-RIGHT: 1px ridge; BORDER-TOP: #ffffff 1px ridge; FONT-SIZE: 12px; BORDER-LEFT: #ffffff 1px ridge; BORDER-BOTTOM: 1px ridge; BACKGROUND-COLOR: #cccccc
}
</STYLE>
27:禁止他人复制你网页的代码:
<body bgcolor="#ffffff"oncontextmenu="return false"onselectstart="return false">
十六:把其它网页放入自已网页中的代码:
<IFRAME align=center src="../../这里换成你要放入网站的网址" frameBorder=0 width=760 scrolling=no height=300></IFRAME
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
CSS兼容IE6,IE7,FF的技巧
收藏一些有用的JS代码
万年历及代码
永硕E盘特效代码集萃
网页设计中收集的一些很实用的代码
HTML代码知识
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服