Difference between revisions of "Team:BNU-China/Integrated Practices"

Line 54: Line 54:
 
     document.querySelector('div#practice').style.backgroundImage='url("https://static.igem.org/mediawiki/2016/a/a6/T--BNU-China--sky2.jpg")';  
 
     document.querySelector('div#practice').style.backgroundImage='url("https://static.igem.org/mediawiki/2016/a/a6/T--BNU-China--sky2.jpg")';  
 
}
 
}
 
+
function getStyle(el,name) {
 +
        if(window.getComputedStyle) {
 +
            return window.getComputedStyle(el, null)[name];
 +
        }else{
 +
            return el.currentStyle[name];
 +
        }
 +
    }
 
function getWH(el, name) {
 
function getWH(el, name) {
 
         var val = name === "width" ? el.offsetWidth : el.offsetHeight,
 
         var val = name === "width" ? el.offsetWidth : el.offsetHeight,

Revision as of 14:27, 12 October 2016

Team:BNU-CHINA - 2016.igem.org