文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>网页技巧

网页技巧

时间:2009-04-03  来源:一品梅521

1.<body oncontextmenu="return false">
 或
 <body style="overflow-y:hidden">
2。加入背景音乐
 IE:<bgsound src="*.mid" loop=infinite>
 NS:<embed src="*.mid" autostart=true hidden=true loop=true>
 </embed>
 *.mid你的背景音乐的midi格式文件
3。简单的window.open方法
 <a href="#"
 onclick="javascript:window.open(文件路径/文件名,newwindow,
 toolbar=no,scrollbars=yes,resizable=no,top=0,left=0,
 width=400,height=300);">文字或图片</a>
 参数解释:
  js脚本结束
4。简单的页面加密
 
5。拉动页面时背景图不动
 <style>
 body{background-image:url(logo.gif);
 background-repeat:no-repeat;background-position:center}
 </style>
6。让浏览器在保存页面时保存失败
 <NOSCRIPT><iframe src="*.html"></iframe></NOSCRIPT>
7。随机替换图片
 
 图片文件名为0.gif 1.gif 2.gif 3.gif 4.gif
8。窗口定时关闭
 先将如下代码网页文件的区:
 
 然后再在<body>标内加入如:<body onload="closeit()">
9。网页自动关闭
 <html>
 <head>
 <object id=closes type="application/x-oleobject"
 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
 <param name="Command" value="Close">
 </object>
 </head>
 <body onload="window.setTimeout(closes.Click(),10000)">
 这个窗口会在10秒过后自动关闭,而且不会出现提示.
 </body>
 </html>
10。网页自动刷新
 在head部记入
 <META HTTP-EQUIV="Refresh" content="20">
 其中20为20秒后自动刷新,你可以更改为任意值。
11。网页自动转页
 <META HTTP-EQUIV="Refresh" CONTENT="时间(秒);URL=地址">
12。保持layer在最前面,而不被Iframe、Object所覆盖
 在Layer中再插Iframe 或 Object 设z-Index值
 <div z-Index:2><object xxx></object> # 前面
 <div z-Index:1><object xxx></object> # 后面
 <div id="Layer2" style="position:absolute; top:40;width:400px;
 z-index:2"> height=100% width=100%>
 <iframe width=0 height=0></iframe>
 </div>
 <div id="Layer1" style="position:absolute; top:50;width:200px;
 z-index:1">
 <iframe height=100% width=100%></iframe>
 </div>
13。返回上一页
 <a href=javascript:history.back(1)>『返回上一页』</a>
14。关闭窗口
 <a href=javascript:self.close()>『关闭窗口』</a>
15。关于iframe的透明背景
 <IFRAME ID="iFrame1" SRC="iframe.htm"
 allowTransparency="true"
 style="background-color: green"></IFRAME>
相关阅读 更多 +
排行榜 更多 +
弓箭手战士酷跑

弓箭手战士酷跑

飞行射击 下载
三角洲行动全面战场攀升A点进攻指南

三角洲行动全面战场攀升A点进攻指南

飞行射击 下载
僵尸射手世界大战

僵尸射手世界大战

飞行射击 下载