额 有些抓狂了。请高手指教。 估计是你的逻辑不对你想取图片的长和宽,必须要在图片生成之后,楼主看看,在你取值之前图片生成了么?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 给个例子<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> <script type="text/javascript"> function IsConfirm() { return window.confirm('确定删除此记录吗?'); } </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 id="Radio1" type="radio" name="aaa" value="1"/> <input id="Radio2" type="radio" name="aaa" value="2"/> <asp:RadioButton ID="RadioButton1" runat="server" /> <input type="button" onclick="checkValue();" value="尺寸调试">改变窗口的大小点击按钮看数值的变化 <div id="debug"></div> <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return IsConfirm()" >LinkButton</asp:LinkButton> </div> </form> </body></html> 请教个问题 Javascript接受服务器端传来值的问题,急。。。。。。 急等一个JS问题 Ext.ux.tree.TreeGrid的默认排序如何改为中文? jqgrid多行同时编辑提交 求大神帮我看看是什么问题 一个文件调用的问题~ 如何在碧海银沙语音聊天室配置脚本中添加机器人? 网页内嵌 object 用于 PDF 显示,如何探测PDF窗口的滑标位置 webstorm能开发webapi吗 请帮助下解释javascript的意思? 如何剪截字符串?谢谢大家
<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>
<script type="text/javascript">
function IsConfirm()
{
return window.confirm('确定删除此记录吗?');
}
</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 id="Radio1" type="radio" name="aaa" value="1"/>
<input id="Radio2" type="radio" name="aaa" value="2"/>
<asp:RadioButton ID="RadioButton1" runat="server" />
<input type="button" onclick="checkValue();" value="尺寸调试">改变窗口的大小点击按钮看数值的变化
<div id="debug"></div>
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return IsConfirm()" >LinkButton</asp:LinkButton>
</div>
</form>
</body>
</html>