function alertSize() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );
}
http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
分享到:
相关推荐
Determination of the instants ofglottal closure (GC) from speech wave using wavelet transform is equivalent to finding a particular local modulus maxima pattern across several scales in the time-scale...
本文介绍了一种系统化的方法——统一不可能差分查找方法(Unified Impossible Differential finding method, UID-method),用于高效地寻找各种块密码结构中的不可能差分。这种方法相较于先前由Kim等人提出的U-...
This application note explains methods that help finding the optimal setting while looking specifically on the stack load caused by interrupt service routines (ISRs) in RTOS applications running on ...
Finding the area and volume of a circle on matlab
Finding the prime factors of 8x leads to an efficient technique on a small machine to compute exact values for permutations and combinations. Before giving the actual steps in the algorithm we first ...
( Wiley Taming the Big Data Tidal Wave, Finding Opportunities in Huge Data Streams with Advanced Analytics (2012).pdf )
These products are always delivered to customers in the square parcels of the same height h as the products have and of the size 6*6. Because of the expenses it is the interest of the factory as well...
从VC的角度分析扫雷的内幕,扫雷的技术密集,扫雷的编写技巧
Abstract—Finding and exploiting vulnerabilities in binary code is a challenging task. The lack of high-level, semantically rich information about data structures and control constructs makes the ...
Welcome to the world of social business, where the creative vision of the entrepreneur is applied to today's most serious problems: feeding the poor, housing the homeless, healing the sick, and ...
总的来说,"Finding the Shortest"项目结合了图论与C++编程,提供了一个实际应用Dijkstra算法的实例。通过学习和实践这个项目,不仅可以深化对Dijkstra算法的理解,还能提升C++编程和问题解决的能力。在实际应用中,...
In desktop and mobile builds, the build size reflects the size of the resulting sharedassets0.assets, sharedassets1.assets (and so on) files that are generated. Also counted are the files in the ...
A hands-on guide to finding the sources of electromagnetic interference and then fixing the problems. Includes basic theory of EMI as well as detailed explanations of why this problem is becoming more...
本文介绍的标题是“使用矩阵的特征向量寻找网络中的社团结构”,主要围绕着newman算法及其在解决网络社团划分问题中的应用进行阐述。社团划分问题是一个研究网络中具有密集内部连接和稀疏外部连接的顶点组的重要领域...
The use of Python for data analysis and visualization has only increased in popularity in the last few years. The aim of this book is to develop skills to effectively approach almost any data analysis...
标题与描述均提到了“寻找电子基态”,这在物理学和材料科学中是一个核心概念,尤其是在密度泛函理论(Density Functional Theory, DFT)的框架下。以下将深入解析这一主题,涵盖标题、描述和部分文件内容中所提及的...