cutmail's blog

write the code

2008-12-09から1日間の記事一覧

IEでsetAttributeでclassが定義できない件について

なんでクラスが変わらないのかなーと思っていろいろ調べてみたら、 IEはDOMオブジェクトのプロパティと属性をごっちゃにしているらしい。つまり、 こう書いても <style type="text/css"> .hoge { background-color:red; } </style> <body> <span class="hoge">hogeクラスの中身</span> </body> <script type="text/javascript"> var span = document.body.appendChil…