var xmlhttp = false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); } var time_num=1; function time_retr(){ if(time_num > 0 && time_num < 2){ time_num ++; plug_ckk('data','kinds=bra_old','bra'); } setTimeout('time_retr()', 1000); } setTimeout('time_retr()', 1000); function plug_ckk(sys,url,kind){ if(sys=='data'){ xmlhttp.open("POST","../config/plug_data.php?"+encodeURI(url),true);//定義傳遞的位置、方式 } xmlhttp.send(null);//傳遞變數 xmlhttp.onreadystatechange=function(){//當資料回傳成功 if (xmlhttp.readyState==4){//回傳狀態 if (xmlhttp.status==200){//回傳狀態編號 document.getElementById(kind).innerHTML=xmlhttp.responseText; }else{ alert("連結錯誤,請工程師查明!"); } } } } function bra_action(data,url,kind){ xmlhttp.open("POST","../config/plug_data.php?"+encodeURI(url)+encodeURI(data),true);//定義傳遞的位置、方式 xmlhttp.send(null);//傳遞變數 xmlhttp.onreadystatechange=function(){//當資料回傳成功 if (xmlhttp.readyState==4){//回傳狀態 if (xmlhttp.status==200){//回傳狀態編號 document.getElementById(kind).innerHTML=xmlhttp.responseText; }else{ alert("連結錯誤,請工程師查明!"); } } } } function bra_ax(obj,url,kind){ bra_action(obj.value,url,kind); } function process(){ plug_ckk('data','kinds=bra_cup','ans'); }