javascript 关于<div>层的问题 因为你放在div中的关系把把div的高度宽度也设置了看看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 上面的是一个DEMO 。。出问题的没发出去。看下面的效果就不一样了 。。我的一个层里有很多图片 要给每个图片都加个style吗?<html> <head> <title>main</title> </head> <body link="#000000" vlink="#000000"> <div id="Layer1" style="position:absolute;left:55;top:100; z-index:1;"> <img id="cei" src="1.jpg" width="200" height="100" /> </div> <div id="Layer2" style="position:absolute;left:55;top:100 ;z-index:2;"> <img id="wal" src="2.jpg" width="200"height="5 "/> </div> </body></html> 把每个IMG标签的width和height都定死成一样的,就不会出现图片不一样大的情况了 哈哈 谢谢热心的朋友们~Thank you! 给你个例子<%@ Page Language="C#" AutoEventWireup="true" CodeFile="text.aspx.cs" Inherits="text" %><!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>Untitled Page</title> <script type="text/javascript">function checkValue(){debug.innerText="网页可见区域宽:document.body.clientWidth.....:"+document.body.clientWidth+"\n"+"网页可见区域高:document.body.clientHeight.....:"+document.body.clientHeight+"\n"+"网页可见区域高:document.body.offsetWidth.....:"+document.body.offsetWidth+"\n"+"网页可见区域高:document.body.offsetHeight.....:"+document.body.offsetHeight+"\n"+"网页正文全文宽:document.body.scrollTop.....:"+document.body.scrollTop+"\n"+"网页正文全文高:document.body.scrollLeft.....:"+document.body.scrollLeft+"\n"+"网页被卷去的高:window.screenTop.....:"+window.screenTop+"\n"+"网页被卷去的左:window.screenLeft.....:"+window.screenLeft+"\n"+"屏幕分辨率的高:window.screen.height.....:"+window.screen.height+"\n"+"屏幕分辨率的宽:window.screen.width.....:"+window.screen.width+"\n"+"屏幕可用工作区高度:window.screen.availHeight.....:"+window.screen.availHeight+"\n"+"屏幕可用工作区宽度:window.screen.availWidth.....:"+window.screen.availWidth+"\n"}</script> </head> <body> <form id="form1" runat="server"> <div onmouseover="aaaa()" onmouseout="bbbb()"> <div id="content_a" style="display:none; position:absolute;"> 这是第一个DIV </div> <input type="button" onclick="checkValue();" value="尺寸调试">改变窗口的大小点击按钮看数值的变化 <div id="debug"></div> </div> </form> </body></html> html中如何使用多重select控制层的显示和隐藏 看完第一个小品,散分~大家新年快乐!! 关于JS改CSS的代码问题 在线编辑超链接 刷新页面清空表单的问题 页面上有一个输入ID的文本框,怎样才能做到进入这个页面后光标自动定位在这个输入框上呢? 关于表单提交的问题. 高分求教打印网页如何不把打印按钮打印出来 俺没有分了,不过这个问题是很有意思的 怎麼除掉兩個表之間的間隙?謝謝!!! 这样的功能怎么实现?DIV层上的数据显示问题 问两个JS的小问题,谢谢大家
出问题的没发出去。看下面的效果就不一样了 。。我的一个层里有很多图片 要给每个图片都加个style吗?
<html>
<head>
<title>main</title>
</head>
<body link="#000000" vlink="#000000">
<div id="Layer1" style="position:absolute;left:55;top:100; z-index:1;">
<img id="cei" src="1.jpg" width="200" height="100" />
</div>
<div id="Layer2" style="position:absolute;left:55;top:100 ;z-index:2;">
<img id="wal" src="2.jpg" width="200"height="5 "/>
</div>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="text.aspx.cs" Inherits="text" %><!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>Untitled Page</title>
<script type="text/javascript">
function checkValue(){
debug.innerText="网页可见区域宽:document.body.clientWidth.....:"+document.body.clientWidth+"\n"+
"网页可见区域高:document.body.clientHeight.....:"+document.body.clientHeight+"\n"+
"网页可见区域高:document.body.offsetWidth.....:"+document.body.offsetWidth+"\n"+
"网页可见区域高:document.body.offsetHeight.....:"+document.body.offsetHeight+"\n"+
"网页正文全文宽:document.body.scrollTop.....:"+document.body.scrollTop+"\n"+
"网页正文全文高:document.body.scrollLeft.....:"+document.body.scrollLeft+"\n"+
"网页被卷去的高:window.screenTop.....:"+window.screenTop+"\n"+
"网页被卷去的左:window.screenLeft.....:"+window.screenLeft+"\n"+
"屏幕分辨率的高:window.screen.height.....:"+window.screen.height+"\n"+
"屏幕分辨率的宽:window.screen.width.....:"+window.screen.width+"\n"+
"屏幕可用工作区高度:window.screen.availHeight.....:"+window.screen.availHeight+"\n"+
"屏幕可用工作区宽度:window.screen.availWidth.....:"+window.screen.availWidth+"\n"
}
</script> </head>
<body>
<form id="form1" runat="server">
<div onmouseover="aaaa()" onmouseout="bbbb()">
<div id="content_a" style="display:none; position:absolute;">
这是第一个DIV </div>
<input type="button" onclick="checkValue();" value="尺寸调试">改变窗口的大小点击按钮看数值的变化
<div id="debug"></div>
</div>
</form>
</body>
</html>