<title></title>
<style type="text/css">
#btn1{ width: 330px;}
#btn2{width: 400px;}
#btn3{width: 100px;}
</style>
</head>
<body>
<form + styleName));
}
}
//只支持ff
function FF() {
alert(document.defaultView.getComputedStyle(document.getElementById('btn2'), null).width);
}
//只支持ie
function ie() {
alert(document.getElementById('btn3').currentStyle.width);
}
</script>
</form>
经过分析,在ie和ff下的用法是不同的!