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
分享到:
相关推荐
estimation procedure for two applications: 1) finding the parameters of a mixture of Gaussian densities, and 2) finding the parameters of a hidden Markov model (HMM) (i.e., the Baum-Welch algorithm) ...
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...
Impossible Differentials
finding the electronic ground state
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 ...
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 Collisions in the Full SHA-1
( 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 ...
Hacking is the art of creative problem solving, whether that means finding an unconventional solution to a difficult problem or exploiting holes in sloppy programming. Many people call themselves ...
Matlab Tutorial - 40 - Finding the Length, Size, Sum, and Number of Elements in a Matrix
decision support systems, knowledge based systems, social media mining and text mining are thoroughly discussed for finding desired solutions for the web data mining and the development of deci- sion...
a novel approach of finding the limits of field of view (FOV) of each camera as visible in the other cameras. We show that if the FOV lines are known, it is possible to disambiguate between multiple ...
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 ...
A reinforcement-learning scheme is then demonstrated, capable of either finding the ground-state or describing the unitary time evolution of complex interacting quantum systems. We show that this ...
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 ...