添加一个相对与窗口固定位子的浮动层
2005-05-12 01:03
288 查看
<div id="MyFavorite" style="position:absolute; left:40px; top:80px; width:100px; height:100px; z-index:25">
<table width="158" border="1" cellspacing="0" cellpadding="3" bgcolor="#dee3e7" bordercolordark="#FFFFFF" bordercolorlight="#336633">
<tr><td>
常去网站导航<br>
<a href="http://community.csdn.net ">CSDN社区</a><br>
<a href="http://www.codeproject.com" >CodeProject</a><br注意:国内老是很难访问<br>
<a href="http://www.codeguru.com ">CodeGuru</a><br这个比较容易访问<br>
<a href="http://www.windows.org ">wxWindows</a><br>
<a href="http://sourceforge.net ">Sourceforge.net</a><br>
<a href="http://www.vchelp.net/vchelp/index.asp ">VCHelp</a><br>
<a href="http://www.vckbase.com ">VCKBase</a>
</td></tr>
</table>
</div>
<script language=JavaScript>
function DivNoMoveInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}
setInterval('DivNoMoveInIE("MyFavorite",100,0)',1)
</script>
<table width="158" border="1" cellspacing="0" cellpadding="3" bgcolor="#dee3e7" bordercolordark="#FFFFFF" bordercolorlight="#336633">
<tr><td>
常去网站导航<br>
<a href="http://community.csdn.net ">CSDN社区</a><br>
<a href="http://www.codeproject.com" >CodeProject</a><br注意:国内老是很难访问<br>
<a href="http://www.codeguru.com ">CodeGuru</a><br这个比较容易访问<br>
<a href="http://www.windows.org ">wxWindows</a><br>
<a href="http://sourceforge.net ">Sourceforge.net</a><br>
<a href="http://www.vchelp.net/vchelp/index.asp ">VCHelp</a><br>
<a href="http://www.vckbase.com ">VCKBase</a>
</td></tr>
</table>
</div>
<script language=JavaScript>
function DivNoMoveInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}
setInterval('DivNoMoveInIE("MyFavorite",100,0)',1)
</script>
相关文章推荐
- 4_如何固定标签,相对于浏览器窗口和一个标签?
- ASP.NET#在设计窗口上添加了一个SqlDataSource控件后,没有显示出来?
- qt中在主窗口添加一个部件
- 如何在浏览器窗口上添加一个遮罩层
- .NET中用弹出窗口添加或修改一个页面,当添加或修改相关内容后按下提交按钮自动刷新页面的JS代码
- iOS UITableViewController 添加一个固定的不能滚动的控件
- 在mfc对话框中添加一个显示网页的窗口
- WebStorm添加多个项目,并且在同一个窗口
- Android任意窗口添加固定/浮动窗体:音乐播放器底部/顶部常驻播放窗体
- MFC(3) 对话框里面添加一个网页浏览窗口
- vc为窗口添加一个阴影或者毛玻璃背景
- 固定一个标准Win32程序的窗口
- java--第十周--任务二 编写一个JFrame,在该窗口中组件的布局是FlowLayout。窗口中添加两个文本区,当我们在一个文本区中输入若干个数时,另一个文本区同时对输入的数进行
- 获取一个控件相对于父窗口的坐标位置
- 给GridView或ListView添加一个固定按钮(类似于微信群聊邀请好友按钮)
- 点击一个超链接,弹出固定大小的新窗口(js实现)
- mysql数据库 如何在一个字段固定位置添加固定字符串?
- Android任意窗口添加固定/浮动窗体:音乐播放器底部/顶部常驻播放窗体
- 一个word文档中,多个表格的批量调整(根据窗口调整表格和添加表格水平线)
- WIN32汇编语言在窗口添加按钮,点击按钮实现跳转到一个程序或者一个URL。。。