龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > div+css/html >

实例技巧文章:网页效果集合

时间:2012-12-29 08:41来源:未知 作者:admin 点击:
分享到:
1。忽视右键 body 或 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。简单的win
1。忽视右键
<body >
 或
<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="#"
 >文字或图片</a>
 参数解释:
 <SCRIPT LANGUAGE="javascript"> js脚本开始;
 window.open 弹出新窗口的命令;
 文件路径/文件名 弹出窗口的文件名;
 newwindow 弹出窗口的名字(不是文件名),非必须,可用空代替;
 width=400 窗口宽度;
 height=300 窗口高度;
 top=0 窗口距离屏幕上方的象素值;
 left=0 窗口距离屏幕左侧的象素值;
 toolbar=no 是否显示工具栏,yes为显示;
 menubar,scrollbars 表示菜单栏和滚动栏。
 resizable=no 是否允许改变窗口大小,yes为允许;
 location=no 是否显示地址栏,yes为允许;
 status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
 </SCRIPT> js脚本结束
4。简单的页面加密
<script LANGUAGE="javascript">
 <!--
 function loopy(){
  var sWord ="";
  while(sWord!="login"){sWord=prompt("请输入你的登陆密码");}
  alert("登陆成功!");
 }
 loopy()
 //-->
 </script>
5。拉动页面时背景图不动
<style>
 body{background-image:url(logo.gif);
 background-repeat:no-repeat;background-position:center}
 </style>
6。让浏览器在保存页面时保存失败
<NOSCRIPT><iframe src="*.html"></iframe></NOSCRIPT>
7。随机替换图片
 <script>
 document.write(<img src="img/+parseInt(Math.random()*(5))
 +.gif"height="40" width="50">)
 </script>
图片文件名为0.gif 1.gif 2.gif 3.gif 4.gif
8。窗口定时关闭
 先将如下代码网页文件的区:
 <script language="javascript">
 function closeit() { setTimeout("self.close()",10000) //毫秒 }
第 1 2 页
精彩图集

赞助商链接