html页面中常用的一些小方法整理

2019-01-14 10:17:43王振洲


&"."& ScriptEngineBuildVersion %>
服务器操作系统<%=Request.ServerVariables("OS")%>

文本竖排方式
<style type="text/css">
<!--
.shupai {Writing-mode:tb-rl}
-->
</style>
超链接去虚线边框
在链接中加上onfocus="this.blur()"

网页搜索关键字 头里插入
<META NAME="keywords" CONTENT="xxxx,xxxx,xxx,xxxxx,xxxx,">

收藏夹图标
<link rel = "Shortcut Icon" href="favicon.ico">

我的电脑
file:///::%7B20D04FE0-3AEA-1069-A2D8-08002B30309D}
网上邻居
file:///::%7B208D2C60-3AEA-1069-A2D7-08002B30309D%7D
我的文档
file:///::%7B450D8FBA-AD25-11D0-98A8-0800361B1103%7D
控制面板
file:///::%7B20D04FE0-3AEA-1069-A2D8-08002B30309D%7D/::%7B21EC2020-3AEA-1069-A2DD-08002B30309D}
回收站
file:///::%7B645FF040-5081-101B-9F08-00AA002F954E%7D

鼠标控制图片隐现效果
把如下代码加入<body>区域中:
<SCRIPT language="javascript">
<!--
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}
//-->
</SCRIPT>
  2、把如下代码加入<body>区域中:
<img src="2.gif" style="filter:alpha(opacity=20)"
onMouseOver="makevisible(this,0)"
onMouseOut="makevisible(this,1)">

禁止图片下载
<A HREF="javascript:void(0)" onMouseover="alert('对不起,此图片不能下载!')">
<IMG SRC="2.gif" Align="center" Border="0" width="99" height="50"></A>

页嵌页
<iframe width=291 height=247 src="main.files/news.htm" frameBorder=0></iframe>

隐藏滚动条
<body style="overflow-x:hidden;overflow-y:hidden"

CSS文字阴影(定义在<TD>中)
.abc{
FILTER: dropshadow(color=#666666, offx=1, offy=1, positive=1); FONT-FAMILY: "宋体"; FONT-SIZE: 9pt;COLOR: #ffffff;
}

列表/菜单
onchange="location=this.options[this.selectedIndex].value"

<iframe id="frm" src="k-xinwen.html" scrolling="no" width="314" height="179"></iframe>
<img src="xiangshang.jpg" onMouseOver="sf=setInterval('frm.scrollBy(0,-2)',1)" onMouseOut="clearInterval(sf)" width="31" height="31">
<img src="xiangxia.jpg" onMouseOver="sf=setInterval('frm.scrollBy(0,2)',1)" onMouseOut="clearInterval(sf)" width="31" height="31" >

reurl=server.htmlencode(request.ServerVariables("HTTP_REFERER"))