Template:Imperial/09/TemplateTop

From 2009.igem.org

(Difference between revisions)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
 +
var viewportwidth;
 +
var viewportheight;
 +
if (typeof window.innerWidth != 'undefined'){
 +
      viewportwidth = window.innerWidth;
 +
      viewportheight = window.innerHeight;
 +
}else if ((typeof document.documentElement != 'undefined') && (typeof document.documentElement.clientWidth) != 'undefined' && document.documentElement.clientWidth != 0){
 +
      viewportwidth = document.documentElement.clientWidth;
 +
      viewportheight = document.documentElement.clientHeight;
 +
}else{
 +
      viewportwidth = document.getElementsByTagName('body')[0].clientWidth;
 +
      viewportheight = document.getElementsByTagName('body')[0].clientHeight;
 +
}
alert('mad');
alert('mad');
 +
document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
 +
//-->
</script>
</script>
</html>
</html>

Revision as of 14:26, 28 September 2009