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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
The Last Watchdog
The Last Watchdog
T
Tenable Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
A
Arctic Wolf
云风的 BLOG
云风的 BLOG
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
MyScale Blog
MyScale Blog
B
Blog
Spread Privacy
Spread Privacy
S
Schneier on Security
Project Zero
Project Zero
L
LINUX DO - 热门话题
M
MIT News - Artificial intelligence
F
Full Disclosure
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
Cyberwarzone
Cyberwarzone
AWS News Blog
AWS News Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tailwind CSS Blog
K
Kaspersky official blog
Recent Announcements
Recent Announcements
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
S
Securelist
P
Privacy & Cybersecurity Law Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Exploit Database - CXSecurity.com
V
Visual Studio Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Webroot Blog
Webroot Blog

博客园 - jenner

js 更改 onclick 事件 - jenner js 去除字符串中重复的字符 - jenner - 博客园 js 获取选中的checkbox的行的其他值 javactript关闭窗体,刷新父窗体....... - jenner - 博客园 js实现动态级联计分,级数无限制 - jenner - 博客园 winform dgv右键选择 - jenner - 博客园 DataGrid 二维表头 DataGrid导出到Excel or word javascript 对datagrid的一些操作 - jenner - 博客园 DataView 属性操作 - jenner - 博客园 javascript 判断整数 javascript控制服务器控件-js操作CheckBoxList实现全选、反选 css控制字数(控制宽度) 网站变黑白 111 test 使用QuickCHM软件轻松编译CHM格式的文件 遍历treeView的所有节点 TreeView第三种状态的另类实现
漂浮div窗体,带停止
jenner · 2008-05-27 · via 博客园 - jenner

js代码
<SCRIPT language="JavaScript">
    <!-- Begin
    var xPos = 20;
    var yPos = 0;
    var step = 1;
    var delay = 30;
    var height = 0;
    var Hoffset = 0;
    var Woffset = 0;
    var yon = 0;
    var xon = 0;
    var pause = true;
    var interval;
    
    floatDiv.style.top = yPos;
    
    function changePos()
    {

     width = document.body.clientWidth;
     height = document.body.clientHeight;
     Hoffset = floatDiv.offsetHeight;
     Woffset = floatDiv.offsetWidth;
     floatDiv.style.left = xPos + document.body.scrollLeft;
     floatDiv.style.top = yPos + document.body.scrollTop;
     if (yon)
     {
      yPos = yPos + step;
     }
     else
     {
      yPos = yPos - step;
     }
     
     if (yPos < 0)
     {
      yon = 1;
      yPos = 0;
     }
     
     if (yPos >= (height - Hoffset))
     {
      yon = 0;
      yPos = (height - Hoffset);
     }
     
     if (xon)
     {
      xPos = xPos + step;
     }
     else
     {
      xPos = xPos - step;
     }
     
     if (xPos < 0)
     {
      xon = 1;
      xPos = 0;
     }
     
     if (xPos >= (width - Woffset))
     {
      xon = 0;
      xPos = (width - Woffset);
     }
    }

    
    function start()
    {
     floatDiv.visibility = "visible";
     interval = setInterval('changePos()', delay);
    }
    
    function stops()
    {
     clearInterval(interval);
    }
    
    start();
    //  End -->
   </SCRIPT>

body代码:

<div class="table" id="floatDiv" onMouseOut="start();" onMouseOver="stops();" style="Z-INDEX: 1;LEFT: 0px;BACKGROUND-IMAGE: url(images/default/bobybg.gif);WIDTH: 180px;POSITION: absolute;TOP: 0px;HEIGHT: 60px"
    runat="server">
    <table id="Table1" cellSpacing="7" cellPadding="0" width="100%" border="0" runat="server">
     <tr>
      <td style="WORD-BREAK: break-all"><asp:DataList id="rptBulletinFloat" Runat="server">
        <ItemTemplate>
         <TABLE width="98%" align="center" border="0" cellPadding="3" cellSpacing="0">
          <tr>
           <td valign="top" width="10">
            <img src="images/Default/bulletin_icon.gif" align="absMiddle" height="12" width="10">
           </td>
           <td align="left">
            <a style="COLOR:#8E236B" target="_blank" href='InformationRelease/Information/InformationView.aspx?informationId=<%# DataBinder.Eval(Container, "DataItem.Id") %>' onclick="OpenFullWindow(this.href);return false;">
             <%# Convert.ToString(DataBinder.Eval(Container.DataItem, "title")).Length> 20 ? Convert.ToString(DataBinder.Eval(Container.DataItem,"title")).Substring(0, 20)+"..." : DataBinder.Eval(Container.DataItem, "title")%>
             ; </a>
           </td>
          </tr>
         </TABLE>
        </ItemTemplate>
       </asp:DataList></td>
     </tr>
     <tr>
      <td align="right"><a onclick="funClose();" style="CURSOR:hand;color:blue">关闭</a> <input id="txtIsNull" style="DISPLAY: none" type="text" name="txtIsNull" runat="server">
      </td>
     </tr>
    </table>
   </div>

posted @ 2008-05-27 15:47  jenner  阅读(1075)  评论()    收藏  举报