Internet Explorer ne supporte pas element.setAttritube('style')
02`08`2007
Aucun commentaire • Poster un commentaire !
Tags: CSS Javascript
if(navigator.appName == 'Microsoft Internet Explorer') {
document.getElementById('test').style.cssText = 'background:gray; color:white;';
} else {
/* document.getElementById('test').style.cssText = 'background:gray; color:white;'; */
document.getElementById('test').setAttribute('style', 'background:gray; color:white;');
}