2016年5月30日星期一

JavaScript02:Computed Stycle,"getComputedStyle",

原因:

如果想知道某一個element的現時style,就需要用到getComputedStyle(elemnet,xxx) method.
第二個參數xxx一定為null或不寫,如想查的是一般的element。
JS Fiddle:https://jsfiddle.net/js_Test4fun/qejv4yd0/17/

2016年5月26日星期四

JavaScript 01:Manipulate CSS via DOM- classList, toggle

原因:

简单学习classList和 toggle。

一段code,按一个制,改变颜色。

JS code:https://jsfiddle.net/js_Test4fun/ndq3qj2o/