This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc3200網頁問題

Other Parts Discussed in Thread: CC3200

小弟是一名大學生剛開始寫cc3200,想以httpserver的程式的網頁部分改成偵測switch 3的方式,加了一些簡單的程式並將LED1改為SWI1,讀的到值(以開關方式表現1或0),是成功的,但必須要重新整理才會有顯示,所以小弟將html的部分改為 

function UpdateStatus()
{

var status = "__SL_G_ULD";
if(status.indexOf("SWI1_ON") > -1)
{

toggleSwitch ('on');
alert('Hi, I am alert box.');
}
else
{
toggleSwitch ('off');
}
if(status.indexOf("LED2_ON") > -1)
document.getElementById("LEDno2").checked = true;
else
document.getElementById("LEDno2").checked = false;
}

並在下面加一句

window.setInterval("UpdateStatus()",100);

希望可以一偵測到swith被按下就馬上跳出警告視窗,但最後變成一樣偵測不到我按按鈕,如果我按著按鈕重新整理會不斷跳出警告視窗根本不管你有沒有按sw

,小弟我也沒學過html或javascript摸不著頭緒,還請高人指點。