Javascript examples for jQuery Method and Property:html
Trying to display aspect ratios via html
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> </head> /*w ww . j a va 2 s. co m*/ <body> <script> function ar() { function gcd(x,y){ return !y?x:gcd(y,x%y); } var s=screen, w=s.width, h=s.height, r=gcd(w,h); return w/r+':'+h/r; } document.body.innerHTML = ar() ; </script> </body> </html>