Team:AHUT China/JSblock

From 2014.igem.org

Revision as of 01:03, 17 October 2014 by Box@igem (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

function ToBeBlock() { document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'; } function ToBeNone() { document.getElementById('light').style.display='none'; document.getElementById('fade').style.display='none'; } function ToBeBlock_info() { document.getElementById('light_info').style.display='block'; document.getElementById('fade_info').style.display='block'; } function ToBeNone_info() { document.getElementById('light_info').style.display='none'; document.getElementById('fade_info').style.display='none'; }


function adjust(){ var content=document.getElementById('AHUT_content');//获得元素 var h=screen.availHeight;//获得屏幕可用高度 content.style.height=h+'px';//设置高度

var content1=document.getElementById('click_me');//获得元素 content1.style.top=h/2-219+'px';

var content2=document.getElementById('detail');//获得元素 content2.style.top=h/2-200+'px'; } window.onload=adjust;