var lastFaqClick=null;var expandIndex = 1; //設定展開一個window.onload=function(){ var faq=document.getElementById("faq"); var dls=faq.getElementsByTagName("dl"); for (var i=0,dl;dl=dls[i];i++){ var dt=dl.getElementsByTagName("dt")[0];//取得標題 dt.id = "faq_dt_"+(Math.random()*100); dt.onclick=function(){ var p=this.parentNode;//取得父節點 if (lastFaqClick!=null&&lastFaqClick.id!=this.id){ var dds=lastFaqClick.parentNode.getElementsByTagName("dd"); for (var i=0,dd;dd=dds[i];i++) dd.style.display="none"; } lastFaqClick=this; var dds=p.getElementsByTagName("dd");//取得對應子節點,也就是說明部分 var tmpDisplay="none"; if (gs(dds[0],"display")=="none") tmpDisplay="block"; for (var i=0;i
var lastFaqClick=null;var expandIndex = 1; //設定展開一個window.onload=function(){ var faq=document.getElementById("faq"); var dls=faq.getElementsByTagName("dl"); for (var i=0,dl;dl=dls[i];i++){ var dt=dl.getElementsByTagName("dt")[0];//取得標題 dt.id = "faq_dt_"+(Math.random()*100); dt.onclick=function(){ var p=this.parentNode;//取得父節點 if (lastFaqClick!=null&&lastFaqClick.id!=this.id){ var dds=lastFaqClick.parentNode.getElementsByTagName("dd"); for (var i=0,dd;dd=dds[i];i++) dd.style.display="none"; } lastFaqClick=this; var dds=p.getElementsByTagName("dd");//取得對應子節點,也就是說明部分 var tmpDisplay="none"; if (gs(dds[0],"display")=="none") tmpDisplay="block"; for (var i=0;i