怎么取不到.currentStyle.content的值
本帖最后由 jslang 于 2013-03-18 16:33:36 编辑 怎么取不到.currentStyle.content的值,我是ie8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<style type="text/css">
.m:before { content: "asdf"; }
.m { color: #ff0000; }
</style>
</head>
<body>
<div class="m">777</div>
<script type="text/javascript">
alert(document.querySelectorAll(".m")[0].currentStyle.content);
</script>
</body>
</html>