电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> Asp>>asp编程开发常用的程序代码之七:

asp编程开发常用的程序代码之七

来源:www.cncfan.com | 2006-8-9 | (有2451人读过)

定义本网页关键字,可以在<head></head>中加入如下代码: <meta name="keywords" content="china,enterprise,business,net">   
content 中所包含的就是关键字,你可以自行设置。   
这里有个技巧,你可以重复某一个单词,这样可以提高自己网站的排行位置,如:

<meta name="keywords" content="china,china,china,china">

ie5.0 的部分快捷键:


a:打开查找功能:ctrl+f
关闭浏览器窗口:ctrl+w
打开地址栏下拉列表框:f4
刷 新:f5
将当前web页保存到收藏夹列表:ctrl+d
打开当前 ie 窗口的一个拷贝:ctrl+n
停止下载当前网页:esc
光标迅速移动到网页的开头:home
光标迅速移动到网页的尾部:end
打开新的地址键入窗口:ctrl+o
打开收藏夹:ctrl+i
打开历史记录文件夹:ctrl+h
打开浏览器设定的默认主页:alt+home




添加到收藏夹:


<a href="/lingcomnet/javascript:window.external.addfavorite(’http://链接’,’说明’);">添加到收藏夹</a>




设为首页:


<a href=/lingcomnet/# onclick=this.style.behavior=’url(#default#homepage)’;this.sethomepage (’http://链接’);>设为首页</a>




定制浏览器地址栏前的小图标:
a:在网页的<head></head>间加入以下语句

<link rel="shortcuticon" href="/lingcomnet/http://…/icon.ico">


即可。其中 icon.ico 为 16x16 的图标文件,

颜色不要超过 16 色。

把滚动条放在浏览器窗口的左边
a:在 <body> 中加 dir=rtl,即 <body dir=rtl>。

让背景图不滚动
ie浏览器支持一个 body 属性 bgproperties,它可以让背景不滚动:


<body background="图片文件" bgproperties="fixed">



删除确认:


<input type="button" name="del" onclick="{if(confirm(’确认删除么@’)){location.href=/lingcomnet/’xxx.asp’;}return false;}" value="on" >


隐藏状态栏中的链接地址:


<script language="javascript">
kstatus();
function kstatus(){
self.status="gblog () ";
settimeout("kstatus()",0);
}
</script>
自定义指定区域的文字大小:
<div id=zoom>sdrrrrrrrrrrrrrrrrrrrrrrrrrrrrr</div>
【<a href="/lingcomnet/javascript:dozoom(16)">大</a> <a href="/lingcomnet/javascript:dozoom(14)">中</a> <a href="/lingcomnet/javascript:dozoom(12)">小</a>】
<script language=javascript>
function dozoom(size){
document.getelementbyid(’zoom’).style.fontsize=size+’px’
}
</script>

input输入框文字效果:


<input type="text" value="123456" style="font-size:38px;color:red;font-family:arial black">
通过层来实现渐淡淡出
<script language="javascript1.2">
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=50
}
</script>
<div style="width:200px;height:200px;filter:alpha(opacity=50);border:1px solid #000;background:#efefef" onmouseover="makevisible(this,0)" onmouseout="makevisible(this,1)">
ywicc.com
</div>


网页屏保
<script language="javascript">
function screensave(){
test.value++;
if(test.value==5){
test.style.display=’none’;
document.all[4].bgcolor=’black’;
}
}
function screenopen(){
test.value=0;
test.style.display=’’;
document.all[4].bgcolor=’’;
}
</script>
<body onkeydown="screenopen()" onmousemove="screenopen()" onload="setinterval(’screensave()’,1000)">
5 秒屏保<input id="test">


让标题动态
<script>
<!--
var tx = new array (
"◇:::::::网页制作学习园地:::::::◇欢迎您!◇",
"◆欢迎大家光临网页制作学习园地网站!◆",
"◆大量供应网页制作教材,资料,源代码,网页制作软件,相关插件光盘!◆",
"◆最可怕的敌人,就是没有坚强的信念!◆",
"◆应该让别人的生活因为有了你的生存而更加美好!◆"
);
var txcount=5;
var i=1;
var wo=0;
var ud=1;
function animatetitle()
{
window.document.title=tx[wo].substr(0, i)+"_";
if (ud==0) i--;
if (ud==1) i++;
if (i==-1) {ud=1;i=0;wo++;wo=wo%txcount;}
if (i==tx[wo].length+10) {ud=0;i=tx[wo].length;}
/ if (window.document.title.length < 20 ) window.document.title=window.document.title+"-";
/ if (window.document.title.length == 20 ) window.document.title=window.document.title+"]";
/ if (window.document.title.length == 21 ) settimeout("window.document.title=’animierte seitentitel ’; ",1000);

parent.window.document.title=tx[wo].substr(0, i)+"_";
settimeout("animatetitle()",100);
}
animatetitle();
/ --></script><script language="javascript">
<!--
function mm_openbrwindow(theurl,winname,features) { /v2.0
window.open(theurl,winname,features);
}
/-->
</script>


隐去浏览器中当鼠标移到图片上跳出的工具栏
<img galleryimg="no">

或者
<head>
<meta http-equiv="imagetoolbar" content="no">
</head>



在form中只有input输入框的情况下...在这个input输入框中按enter进行提交表单
<form onsubmit="if(event.srcelement.name==’bb’){this.submit()}else{return false}">
<input name=a size=20>
<input type=button name=bb onclick="submit();">
</form>

删除确认
<input type="button" value="删除" onclick="{if(confirm(’确认删除么?’)){location.href=/lingcomnet/’aa.asp’;}return false;}">

<a href="/lingcomnet/aa.asp" onclick="{if(confirm(’确定删除吗@’)){return true;}return false;}">删除</a>

<a href="/lingcomnet/del.asp" onclick="return confirm(’该删除操作将无法恢复!是否继续?’)">删除</a>

返回页面顶部:
javascript:window.scroll(0,0)


离开页面时弹出警告:
<body onbeforeunload="checkclose()">

<script>
function checkclose(){
event.returnvalue = "测试啊" /xxx可以改为任何文本信息也可以是空
}
</script>

<a href="/lingcomnet/a.asp">aa</a>
Asp热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2026 电脑爱好者 版权所有 备案号:鲁ICP备09059398号