2011年6月5日 星期日

大小冬泉豹

大隻是坐騎,小隻是觀賞寵 (廢話!

2011年5月17日 星期二

巫毒刻像

4.1考古新增老兄類小寵物
不太有特色的感覺... = =

2011年5月16日 星期一

古老的琥珀

4.1考古新增玩具
使用後變這樣
是個BUFF(orz) 持續5分鐘,物品CD30分鐘

2011年5月11日 星期三

設定/取得/移除DOM物件的style屬性

有兩種方法...
方法1: 適用IE9及其他非IE瀏覽器
obj.style.setProperty("background-color", "green");
obj.style.getPropertyValue("background-color");
obj.style.removeProperty("background-color");

方法2: 適用IE系列
obj.style.setAttribute("backgroundColor", "green");
obj.style.getAttribute("backgroundColor");
obj.style.removeAttribute("backgroundColor");

加上判斷瀏覽器類別,就一次搞定了
<html>
<head> 
<script type="text/javascript"> 
    function testMethod() {
        var browser=navigator.userAgent;
        var myDiv=document.getElementById("myDiv");
        if(browser.search("MSIE")>-1){
            alert(myDiv.style.getAttribute("backgroundColor"));
            myDiv.style.removeAttribute("backgroundColor");
            myDiv.style.setAttribute("backgroundColor", "green");
            alert(myDiv.style.getAttribute("backgroundColor"));
        }else{
            alert(myDiv.style.getPropertyValue("background-color"));
            myDiv.style.removeProperty("background-color");
            myDiv.style.setProperty("background-color", "green");
            alert(myDiv.style.getPropertyValue("background-color"));
        }
    }
</script> 
</head> 
<body> 
<div id="myDiv" style="background-color: red; height: 50px; width: 50px"></div><br /> 
<input type="button" value="T E S T" onclick="testMethod()" /> 
</body> 
</html> 

參考資料:Style handling methods in JavaScript

2011年5月10日 星期二

羅技 M705 馬拉松滑鼠


舊的去了新的就來了

2011年3月29日 星期二

羅技 K340


好優惠,不買嗎?

2011年2月28日 星期一

幸運女神 2011 OAD Vol.1

嘖...再高一點阿.....