mychar.style.fontSize="20px"; //这个不加px无效,为什么?
css里面你写font-size:20;见到有效过没呢?
css 中写font-size 是不是要加单位或者"%"呢,JS也是这个道理。