易截截图软件、单文件、免安装、纯绿色、仅160KB

javaScript获取页面,屏幕等高度与宽度

//获取页面数据
 function getPageSize(){  
   var xScroll, yScroll;  
   if (window.innerHeight && window.scrollMaxY) {  
     xScroll = document.body.scrollWidth;
     yScroll = window.innerHeight + window.scrollMaxY;
   } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
     xScroll = document.body.scrollWidth;
     yScroll = document.body.scrollHeight;
   } else{ // Explorer Macwould also work in Explorer 6 Strict, Mozilla and Safari
     xScroll = document.body.offsetWidth;
     yScroll = document.body.offsetHeight;
   }
   var windowWidth, windowHeight;
   if (self.innerHeight) {  // all except Explorer
     windowWidth = self.innerWidth;
     windowHeight = self.innerHeight;
   } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
     windowWidth = document.documentElement.clientWidth;
     windowHeight = document.documentElement.clientHeight;
   } else if (document.body) { // other Explorers
     windowWidth = document.body.clientWidth;
     windowHeight = document.body.clientHeight;
   }  
   // for small pages with total height less then height of the viewport
   if(yScroll < windowHeight){
     pageHeight = windowHeight;
   } else { 
     pageHeight = yScroll;
   }
   if(xScroll < windowWidth){  
     pageWidth = windowWidth;
   } else {
    


相关文档:

在CDHTMLDialog中用JavaScript调用C++函数

在类的构造函数中添加
EnableAutomation(); 
在OnInitDialog中添加
SetExternalDispatch(GetIDispatch(TRUE)); 
在类的声明中添加宏
DECLARE_DISPATCH_MAP() 
在类的实现文件中添加组宏
BEGIN_DISPATCH_MAP(当前类, 基类)
END_DISPATCH_MAP() 
然后就可以用 DISP_FUNCTION宏来映射导出函 ......

JavaScript基础应用

JavaScript就这么回事1:基础知识
1 创建脚本块
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 隐藏脚本代码
1: <script language=”JavaScript”>
2: <!--
3: document.write(“Hello”);
4: // -->
5: </script ......

javascript调用父窗口(父页面)的方法

javascript调用父窗口(父页面)的方法
window.parent与window.opener的区别 javascript调用主窗口方法
1:   window.parent 是iframe页面调用父页面对象
举例:
a.html
Html代码
<html>  
    <head><title>父页面</title></head> &nb ......

学习笔记 JavaScript基础

JavaScript基础
stringObject.charAt(index)方法:返回指定索引位置处的字符。
stringObject.slice(start,[end])和stringObject.substring(start,[end])方法都接受两个参数,分别为子字符串的起始位置和终止位置,返回这两者之间的字符串,不包括终止位置的那个字符串。如果不指定第二个参数,则默认为字符串的长度,即 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号