2个回答
展开全部
<span>文字</span>
<br /><br />
<div>div层</div>
<script>
var div1=document.getElementsByTagName('div')[0];
var span1=document.getElementsByTagName('span')[0];
div1.style.cssText='display:none;width:100px;height:80px;border:#cccccc 1px solid;line-height:80px;text-align:center;background-color:#eeeeee;';
span1.onmousemove=function(){div1.style.display='';};
div1.onmouseout=function(){this.style.display='none';};
</script>
<br /><br />
<div>div层</div>
<script>
var div1=document.getElementsByTagName('div')[0];
var span1=document.getElementsByTagName('span')[0];
div1.style.cssText='display:none;width:100px;height:80px;border:#cccccc 1px solid;line-height:80px;text-align:center;background-color:#eeeeee;';
span1.onmousemove=function(){div1.style.display='';};
div1.onmouseout=function(){this.style.display='none';};
</script>
展开全部
<script type="text/javascript">
function $(id)
{
var obj= document.getElementById(id);
return obj;
}
function showobj(id)
{
var obj=$(id);
obj.style.display="";
}
function hiddenobj(id)
{
var obj=$(id);
obj.style.display="none";
}
window.onscroll=Showad;
function Showad()
{
var obj1=document.getElementById("leftad");
var obj2=document.getElementById("rightad");
obj1.style.top=document.documentElement.scrollTop+100+"px";
obj2.style.top=document.documentElement.scrollTop+100+"px";
}
</script>
function $(id)
{
var obj= document.getElementById(id);
return obj;
}
function showobj(id)
{
var obj=$(id);
obj.style.display="";
}
function hiddenobj(id)
{
var obj=$(id);
obj.style.display="none";
}
window.onscroll=Showad;
function Showad()
{
var obj1=document.getElementById("leftad");
var obj2=document.getElementById("rightad");
obj1.style.top=document.documentElement.scrollTop+100+"px";
obj2.style.top=document.documentElement.scrollTop+100+"px";
}
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询