在线等着给你分数,两个问题,一个浮动窗口的代码和推荐一本javascript的好书给我。 1.第一个效果仿照这个站的首页右边浮动窗口 http://www.0595eye.com/ 给我类似的代码就可以了。2.给我推荐几本好的javascript的好书,入门提高都行的,谢谢各位了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.不会;2.<<JAVASRCIPT权威指南第五版(或者是看有最新的看最新的)>> 我知道javascript权威指南和王者归来都不错! JavaScript语言精粹javascript高级程序设计浮动窗口难道不是个div么? 1.第一个效果仿照这个站的首页右边浮动窗口 http://www.0595eye.com/ 给我类似的代码就可以了。网站没名,怎么保证不是病毒木马之类的。自己扒他代码,“查看代码”不知道吗?这样的网站用的方法应该是比较简单容易扒的。2.给我推荐几本好的javascript的好书,入门提高都行的,谢谢各位了!搜索JS的各种从入门到精通、各种大全、各种解析、各种精解、各种详解、各种透视、各种无废话、各种汇萃。 浮动广告:使用div.style来精确定位可以关闭的浮动广告:右栏浮动广告 <script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>2:http://www.enet.com.cn/eschool/video/js_lts/ 一个视频教学 <html> <script> var imgPanel = document.createElement("img"); imgPanel.src = "http://www.cnblogs.com/images/logo_small.gif"; function FloatDiv(youPanel) { this.container = document.createElement("div"); this.container.appendChild(youPanel); this.innerPanel = youPanel; this.container.style.position = "fixed";//这个属性会保持你这个container的决定位置 this.container.style.right = "0px";//设置靠右边 //this.container.style.top = "100px";//设置Y轴位置 this.container.style.bottom = "10px";//设置Y轴位置 document.body.appendChild(this.container); } function doSomething() { //首先添加一些占空间的div for(var i = 0; i < 100; i++) { var split = document.createElement("div"); split.innerHTML = "the " + i +" line"; document.body.appendChild(split); } //新建一个浮动div,把你想要放进去的东西给塞进去就好了 new FloatDiv(imgPanel); } </script> <body onload="doSomething()"> </body></html> 《javascript高级程序设计》就很不错!! 这个不错。500多页,老外写的,图灵社出版的,学的不一定是它的技术,可以是它的思维逻辑,解决问题的方法!从中可以获益不少!呵呵,DIV就是一个浮云,我个人认为核心就在于CSS的2个属性上:position:absolute;z-index:1000(足够大即可) 浮动定位DIV代码,兼容各中浏览器,代码简单:<div id="oLayer" style="position:absolute;left:30;top:60;z-index:2;background:green;width:120px;height:70px"></div><script type="text/javascript">document.write(new Array(100).join("<br>"));var init_pos=oLayer.style.posTop;function eee(){ if(window.event) {oLayer.style.posTop=document.body.scrollTop+init_pos;} else {document.getElementById('oLayer').style.position="fixed";} }window.onscroll = eee; </script> 《javascript高级程序设计》《javascript语言精粹》《高性能javascript》 <!doctype html><html dir="ltr" lang="zh-CN"> <head> <meta charset="utf-8"/> <title>CSS Position Fixed for IE6</title> <style>* html,* html body {background-image:url(about:blank);background-attachment:fixed;}* html .fixed-top {position:absolute;bottom:auto; top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));}* html .fixed-right {position:absolute;right:0px;left:auto;}* html .fixed-bottom {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}* html .fixed-left {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}.fixed-bottom { position:fixed; left:0px; bottom:20px; background:aqua; width:200px; height:200px;}.fixed-right{ position:fixed; right:0px; left:auto; top:200px; top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 )); background:red; width:200px; height:200px;}.fixed-top{ position:fixed; top:0px; left:0px; background:blue; width:200px; height:200px;} </style> </head> <body> <div style='height:2000px;width:500px;margin:10px auto; border:1px solid red;'></div> <div class="fixed-top"></div> <div class="fixed-bottom"></div> <div class="fixed-right"></div> </body></html>JAVASRCIPT权威指南第五版JAVASRCIPT 真谛 遇到的极品问题,求大神解惑!?围观。 easyui 中放置一个button按钮,怎么写方法关闭当前tab页 求一个正则表达式,在线等。。。。 关于borderColor和getComputedStyle 控键在页面上索引值的问题 请教无刷新更新数据后的数据按table的固定格式显示 一个文本框在table中,怎样获得这个table,有办法吗? 请问在javascript中有方法实现跳转到其他页面吗? 复选框问题...谢谢 ! 关于showModelessDialog的问题! 急求"用户登录后长时间无操作,自动注销"的实现方法和代码,最好是用JS脚本控制 关于点击文本框 文字消失的js问题
2.<<JAVASRCIPT权威指南第五版(或者是看有最新的看最新的)>>
javascript高级程序设计浮动窗口难道不是个div么?
网站没名,怎么保证不是病毒木马之类的。自己扒他代码,“查看代码”不知道吗?这样的网站用的方法应该是比较简单容易扒的。2.给我推荐几本好的javascript的好书,入门提高都行的,谢谢各位了!
搜索JS的各种从入门到精通、各种大全、各种解析、各种精解、各种详解、各种透视、各种无废话、各种汇萃。
可以关闭的浮动广告:
右栏浮动广告
<script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>2:
http://www.enet.com.cn/eschool/video/js_lts/ 一个视频教学
<script>
var imgPanel = document.createElement("img");
imgPanel.src = "http://www.cnblogs.com/images/logo_small.gif"; function FloatDiv(youPanel)
{
this.container = document.createElement("div");
this.container.appendChild(youPanel);
this.innerPanel = youPanel;
this.container.style.position = "fixed";//这个属性会保持你这个container的决定位置
this.container.style.right = "0px";//设置靠右边
//this.container.style.top = "100px";//设置Y轴位置
this.container.style.bottom = "10px";//设置Y轴位置
document.body.appendChild(this.container);
} function doSomething()
{
//首先添加一些占空间的div
for(var i = 0; i < 100; i++)
{
var split = document.createElement("div");
split.innerHTML = "the " + i +" line";
document.body.appendChild(split);
} //新建一个浮动div,把你想要放进去的东西给塞进去就好了
new FloatDiv(imgPanel);
}
</script>
<body onload="doSomething()">
</body>
</html>
这个不错。500多页,老外写的,图灵社出版的,学的不一定是它的技术,可以是它的思维逻辑,解决问题的方法!从中可以获益不少!呵呵,DIV就是一个浮云,我个人认为核心就在于CSS的2个属性上:position:absolute;z-index:1000(足够大即可)
<script type="text/javascript">
document.write(new Array(100).join("<br>"));
var init_pos=oLayer.style.posTop;function eee(){
if(window.event)
{oLayer.style.posTop=document.body.scrollTop+init_pos;}
else
{document.getElementById('oLayer').style.position="fixed";}
}
window.onscroll = eee;
</script>
《javascript语言精粹》
《高性能javascript》
<!doctype html>
<html dir="ltr" lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>CSS Position Fixed for IE6</title>
<style>
* html,* html body {background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top {position:absolute;bottom:auto; top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));}
* html .fixed-right {position:absolute;right:0px;left:auto;}
* html .fixed-bottom {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
* html .fixed-left {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
.fixed-bottom {
position:fixed;
left:0px;
bottom:20px;
background:aqua;
width:200px;
height:200px;
}
.fixed-right{
position:fixed;
right:0px;
left:auto;
top:200px;
top:expression(eval(document.documentElement.scrollTop +(document.documentElement.clientHeight-this.offsetHeight)/2 ));
background:red;
width:200px;
height:200px;
}
.fixed-top{
position:fixed;
top:0px;
left:0px;
background:blue;
width:200px;
height:200px;
}
</style> </head>
<body>
<div style='height:2000px;width:500px;margin:10px auto; border:1px solid red;'></div>
<div class="fixed-top"></div>
<div class="fixed-bottom"></div>
<div class="fixed-right"></div>
</body>
</html>
JAVASRCIPT权威指南第五版
JAVASRCIPT 真谛