看板
[ PHP ]
討論串[請益] Javascript 迴圈找ID
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
網頁裡面的欄位有6個ID分別為:tb1,tb2,tb3,tb4,tb5,sum. 想要回圈的方式把5個tb值加起來...再用sum顯示. 請問我在javascript 裡面跑回圈. var sum =0;. for(i=1;i<6;i++). {. sum=sum+getElementById("t
(還有33個字)
內容預覽:
<!DOCTYPE html>. <html>. <body>. <p id="demo">Click the button to see the result.</p>. <input id="tb1"><input id="tb2"><input id="tb3"><input id="tb4"
(還有253個字)
首頁
上一頁
1
下一頁
尾頁