2010-07-03 27 views

回答

0

作爲第一步,請看代碼:)(這裏有點複雜,因爲頁面使用XML + XSL,但仍然不難找到javascript。)

function changeDisplayState (id, caller) { 
    e=document.getElementById(id); 
    here=document.getElementById(caller); 
    if (e.style.display == 'none' || e.style.display =="") { 
     e.style.display = 'block'; 
     here.style.backgroundColor = '#C9C7C8'; 
    } else { 
     e.style.display = 'none'; 
     here.style.backgroundColor = 'white'; 
    } 
} 

正如你所看到的,它是純javascript。

+0

謝謝!我曾嘗試在Chrome和Firefox上查看源代碼,沒有向我展示JS,使用了firebug,並看到了JS和CSS。 :) – n00b 2010-07-03 07:41:57