惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
L
LINUX DO - 热门话题
S
Schneier on Security
NISL@THU
NISL@THU
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
量子位
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Cyberwarzone
Cyberwarzone
B
Blog
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Microsoft Security Blog
Microsoft Security Blog
Vercel News
Vercel News
小众软件
小众软件
M
MIT News - Artificial intelligence
I
InfoQ
aimingoo的专栏
aimingoo的专栏
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
美团技术团队
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
Help Net Security
Help Net Security
WordPress大学
WordPress大学
V
Vulnerabilities – Threatpost
T
Tenable Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
D
Docker
MongoDB | Blog
MongoDB | Blog
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
A
About on SuperTechFans
L
LINUX DO - 最新话题
B
Blog RSS Feed
D
DataBreaches.Net
博客园 - 司徒正美
Recorded Future
Recorded Future
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog

博客园 - 江湖工夫

TextBox控件TextMode=Password时赋值 Iframe页面内容变更页面自动改变大小(非加载时自适应大小) 抓取网络文件的URL地址作附件发送 SQL注入的漏洞,过滤httprequest Visual SourceSafe应用守则[转] Microsoft SQL Server 分析服务 SQL中使用DISTINCT显示多个字段的方法(不使用DISTINCT了) GridView分页后跳转其他页面进行添加,编辑,删除操作后,仍返回到当前页码[原] Ajax的按钮事件效果 层的移动,使用了jquery asp.net(C#)处理数据一个通用类,包括存储过程,适用于初学者[转] IE和Firefox在JavaScript方面的兼容性(汇编) asp.net 对xml文件的读写,添加,修改,删除操作[转] 一些动画进度的图标链接 邹建的通用分页存储过程[转] 一个存储过程实现将Excel数据导入数据库 SQL SERVER事务处理[转] SQL与MDX语法的比较 一个存储过程
[转]随滚动条滚动的层(支持IE6,FF2)
江湖工夫 · 2008-07-21 · via 博客园 - 江湖工夫

<!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 runat="server">
    
<title>未命名頁面</title>
    
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" />
    
<style>
.xScrollStick
{
    position
:absolute;
    padding
:15px;
    border
:1px solid black;
    width
:120px;
    height
:24px;
}

</style>
<script language="javascript">
//<![CDATA[
//
********************/
//
  x 系列之 xScrollStick
//
  作者:Hutia
//
  未经同意不得转载或用于商业用途
//
********************/
/*
说明:
  x系列是Hutia开发的系列JS代码,配合相应的css后可以实现快速的自定义标签
  目前xScrollStick支持的浏览器类型为:IE5.5, FF1.5
  xScrollStick的标签为
      <div class="xScrollStick">
          Content
      </div>
  
  支持属性:
    无
  支持方法:
    无
*/

//**载入CSS***** spcssxframe.css
var xScrollStickCssFilePath="sp\/css\/xframe.css";
//document.write("<style>@import url("+xScrollStickCssFilePath+");</style>");
//
**检测浏览器种类*****
var BROWSERNAME="";
switch(navigator.appName.toLowerCase()){
    
case "netscape":
        BROWSERNAME
="ns";
    
break;
    
case "microsoft internet explorer":
    
default:
        BROWSERNAME
="ie";
    
break;
}

//**设置初始化事件******
switch(BROWSERNAME){
    
case "ns":
        window.addEventListener(
"load",_xScrollStick_init,false);
    
break;
    
case "ie":
    
default:
        window.attachEvent(
"onload",_xScrollStick_init);
}

//**初始化函数******
function _xScrollStick_init(){
    
var allTheScrollSticks=document.getElementsByTagName("div");
    
for(var i=0;i<allTheScrollSticks.length;i++){
        
if(allTheScrollSticks[i].className.match(/^((xScrollStick)|(.+ +xScrollStick)|(xScrollStick +.+)|(.+ +xScrollStick +.+))$/))_xScrollStick_event_doInit(allTheScrollSticks[i]);
    }

    window_event_scroll();
}

//**事件响应函数区******
function _xScrollStick_event_doInit(element){
    
//初始化变量
    element.offX=element.offsetLeft;
    element.offY
=element.offsetTop;
    
    
//设置方法
    element.Stick=_xScrollStick_method_Stick;
    
    
//设置事件
    switch(BROWSERNAME){
        
case "ns":
            window.addEventListener(
"scroll",window_event_scroll,false);
        
break;
        
case "ie":
        
default:
            window.attachEvent(
"onscroll",window_event_scroll);
    }

    
    
//获取设置
    //
    document.body.parentNode.onscroll=window_event_scroll;
}

function window_event_scroll(){
    
var allTheScrollSticks=document.getElementsByTagName("div");
    
for(var i=0;i<allTheScrollSticks.length;i++){
        
if(allTheScrollSticks[i].className.match(/^((xScrollStick)|(.+ +xScrollStick)|(xScrollStick +.+)|(.+ +xScrollStick +.+))$/))try{allTheScrollSticks[i].Stick();}catch(e){}
    }

}

//**方法函数区******
function _xScrollStick_method_Stick(){
    
var x=this.offX, y=this.offY, po=this;
    
this.style.position="absolute";
    x
+=document.body.parentNode.scrollLeft;
    y
+=document.body.parentNode.scrollTop;
    
this.style.left=x+"px";
    
this.style.top=y+"px";
    
}

//**通用函数区***
//

//
]]>
</script>
</head>

<body>
<div class="xScrollStick" style="left:0px;top:0px">
    Content..
</div>
<div style="top:0px;width:400px;height:2000px; padding-left:80px;">
afosdhfosdhg
<br>
afosdhfosdhg
<br>afosdhfosdhg<br>
afosdhfosdhg
<br>afosdhfosdhg<br>
afosdhfosdhg
<br>afosdhfosdhg<br>
afosdhfosdhg
<br>afosdhfosdhg<br>
afosdhfosdhg
<br>afosdhfosdhg<br>
afosdhfosdhg
<br>
</div>
</body>
</html>