web(ASP)常用代码[7]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 lirefea 的 blog


从天而降并有幻影效果的窗口

  <head> 
  <script language="javascript"> 
  function move(x) { 
  if(self.moveby){ 
  self.moveby (0,-800); 
  for(i = x; i > 0; i--) 
  { 
  self.moveby(0,3); 
  } 
  for(j = 200; j > 0; j--){ //如果你认为窗口抖动厉害,就200换成个位数 
  self.moveby(0,j); 
  self.moveby(j,0); 
  self.moveby(0,-j); 
  self.moveby(-j,0); 
  } 
  } 
  } 
  </scrip> 
  <body bgcolor=#ffffff onload=move(280)> 
  </body> 
  </head> 

表格的半透明显示效果
在<head></head>之间加上如下代码: 
<style> 
.alpha{filter: alpha(opacity=50)} //50表示50%的透明度 
</style> 

在<body></body>之间加上如下代码: 
<table border="1" width="100" height="62" class="alpha" bgcolor="#f2a664" > 
 <tr> 
  <td width="100%" height="62"> 
  <div align="center">很酷吧!</div> 
  </td> 
 </tr> 
</table>


锁定状态栏文字防止显示地址
<body onmouseover="self.status='文字';return true">


禁止图片下载
在<body......>这里的最后加入:
oncontextmenu="return false" ondragstart="return false" onselectstart="return false" scroll="auto"

禁止缓存
<meta http-equiv="expires" content="0"> 
<meta http-equiv="cache-control" content="no-cache"> 
<meta http-equiv="pragma" content="no-cache"> 
加在head里

使用包含页面
加密所包含页面地址,使用工具 htmlguardian5.3.5
目前功能最强的html代码加密软件,可以保护连接和html代码被盗。1.锁右键。2.禁鼠标圈选。3.不允许离线使用。4.密码保护。5.不显示状态栏url地址。6.全代码 或 局部代码保护。7.链接跟踪。8.禁止打印(ie5+)。9.压缩代码( 未加密前)。10.可加密*.html *.js *.asp *.vbs。11.两种不同加密算法。12.加密 frameset 结构。13.某些功能支持几个不同版本的浏览器。
 


下载flash我的三种方法:
--查看源文件,找出flash的绝对路径,复制,在flashget(或蚂蚁)中点任务
,然后点新建下载任务即可。
--在ie的临时文件夹temporary internet files里把所有的东西都删掉,然后

刷新你想要下载flash的网页,即可得到你所要的flash
--使用外部软件,推荐使用flash catcher,安装后只需在你所要下载的flash上右键,save即可。


让iframe框架内的文档的背景透明
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>



进入页面后立即自动刷新?
<meta http-equiv="refresh" content="120;url=http://www.wodutom.com/cn083">
http://www.wodutom.com/cn083,这是你自己的网址。

打开窗口即最大化
<script language="javascript"> 
<!-- begin 
self.moveto(0,0)
self.resizeto(screen.availwidth,screen.availheight)
// end --> 
</script>

能隐藏iframe的滚动条吗?我知道的三种方法:
1. 设置iframe scrolling="no"
2. 被包含页body应用overflow:hidden
3. 被包含页的body标签加scroll="no"

加入背景音乐

<bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于ie

<embed src="music.mid" autostart="true" loop="true" hidden="true"> 

对netscape ,ie 都适用


嵌入网页

<iframe name="tt" src="01a.html" width="450" height="287" scrolling="auto" frameborder="0"></iframe>



跳转

<meta http-equiv="refresh" content="3;url=list.htm">


滚动

<marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollamount=4>
</marquee>


细线分隔线

<hr noshade size=0 color=#c0c0c0>



过度方式

<meta http-equiv="page-exit" content="revealtrans(duration=3,transition=5)">
duration的值为网页动态过渡的时间,单位为秒。
transition是过渡方式,它的值为0到23,分别对应24种过渡方式。如下表:
0 盒状收缩 1 盒状放射
2 圆形收缩 3 圆形放射
4 由下往上 5 由上往下
6 从左至右 7 从右至左
8 垂直百叶窗 9 水平百叶窗
10 水平格状百叶窗 11垂直格状百叶窗
12 随意溶解 13从左右两端向中间展开
14从中间向左右两端展开 15从上下两端向中间展开
16从中间向上下两端展开 17 从右上角向左下角展开
18 从右下角向左上角展开 19 从左上角向右下角展开
20 从左下角向右上角展开 21 水平线状展开
22 垂直线状展开 23 随机产生一种过渡方式



如何控制横向和纵向滚动条的显隐?

<body style="overflow-y:hidden"> 去掉x轴
<body style="overflow-x:hidden"> 去掉y轴
<body scroll="no">不显


定义本网页关键字,可以在<head></head>中加入如下代码:

<meta name="keywords" content="china,enterprise,business,net">    

本文关键:web(ASP)常用代码
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top