第一種方法:
function submitData( > var tb = document.getElementById(IDArray[0]); //取得伺服器控制項GridView的ID
if (tb)
= 1; i var id = rows[i].cells[1].innerText;
varname = rows[ vari]. > var oDropDownList = rows[i].cells[3].childNodes[0];
var oText = oDropDownList.options[oDropDownListList. var oValue = oDropDownList.options[oDropDownList.selectedIndex].value;; //取得GridView中下拉清單中選取的值
}
}
複製程式碼
程式碼如下:
function submitData() {<. document.getelementbyid class="codetitle"> if (tb.hasChildNodes) {
if (tb. 0]. childNodes.length; for (var i = 1; i var id = rowCount[i]. cells[1].innerHTML; var name = child.childNodes[1].innerHTMLNode Nodes[0]; var oText = oDropDownList.options[ oDropDownList.selectedIndex].text; var oValue = oDropDownList.options[oDropDownList.selectedIndex].value } }