首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>ASP教程>资讯:asp实现类似的浏览记录的功能

asp实现类似的浏览记录的功能

www.jz123.cn  2010-10-07   来源:   中国建站    责任编辑(袁袁)    我要投递新闻

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>看看你上过哪些网站</title>
</head>
<body>
<style>
a
{display:none}
a:visited
{display:none; font-size:60px}
</style>
<script>
function hasVisted(url)
{
   
var lnk = document.createElement("a");

    lnk.href
= url;
    document.body.appendChild(lnk);

   
try{
        sty
= lnk.currentStyle || getComputedStyle(lnk, null);
       
return sty.fontSize == "60px";
    }
   
catch(e){}
   
finally{
        document.body.removeChild(lnk);
    }
}
</script>

<p>你最近浏览过:</p>

<script>
var demo = [
   
"http://www.google.com",
   
"http://www.baidu.com",
   
"http://tieba.baidu.com",
   
"http://hi.baidu.com",
   
"http://www.qq.com",
   
"http://qzone.qq.com",
   
"http://www.163.com",
   
"http://www.sina.com",
   
"http://www.sohu.com",
   
"http://www.cnblogs.com",
   
"http://www.csdn.com",
   
"http://bbs.blueidea.com"
];



var url;
for(var i=0; i<demo.length; i++)
{
    url
= demo[i];
   
if(hasVisted(url))
        document.write(
"<img src='" + url + "/favicon.ico' /> " + url + "<br />");
}
</script>
</body>
</html>



上一篇:ASP转化ACCESS为SQL数据库连接 下一篇:ASP删除记录和链接数据库程序

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图