网站首页 设计资讯 网页素材 矢量素材 网页素材 桌面壁纸 图片素材 高清图片 网页模板 设计字体 软件代码 设计教程 设计公司 设计论坛
返回简洁设计网首页
最新软件代码 推荐软件代码 热门软件代码
网页经典代码(二)
8.永远都会带着框架

<script language="javascript"><!--
 if (window == top)top.location.href = "frames.htm";// --></script>

说明:frames.htm为你的网页,这也是保护页面的一种方法


9.防止被人frame

<SCRIPT LANGUAGE=javascript><!--
 if (top.location != self.location)top.location=self.location;
// --></SCRIPT>

10.网页将不能被另存为

<noscript><iframe src=*.html></iframe></noscript>
说明:<noscirpt>的用法很广,其中一条就是可以使JS广告失效。

11.查源文件

<input type=button value=查看网页源代码
onclick="window.location = 'view-source:'+ 'http://www.e3i5.com/test.htm';">


12.COOKIE脚本记录,有很大的用处哦

function get_cookie(Name) {
var search = Name + "="

var returnvalue = "";

if (documents.cookie.length > 0) {

offset = documents.cookie.indexOf(search)

if (offset != -1) { // if cookie exists

offset += search.length

// set index of beginning of value

end = documents.cookie.indexOf(";", offset);

// set index of end of cookie value

if (end == -1)

end = documents.cookie.length;

returnvalue=unescape(documents.cookie.substring(offset, end))

}

}

return returnvalue;

}


function loadpopup(){

if (get_cookie('popped')==''){

openpopup()

documents.cookie="popped=yes"

}

}

说明:以上是JS代码,请自己加起始符和结束符

  • 上一篇学院:
  • 下一篇学院:
    • 点击排行
    • 评论排行
    设为首页 | 加入收藏 | 点此联系管理员 | 友情链接 | 网站地图 | 广告服务
    版权所有 简洁设计网 [www.jianjie8.com] 您电脑的分辨率是 像素
    Copyright 2008-2015 Www.Jianjie8.Com All Rights Reserved
    陇ICP备05003399号