Js无法获取动态创建的text的值。为什么。为什么
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="attrlayeredit.aspx.cs" Inherits="WebUI.attrlayeredit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="style/prosystem.css" />
<link href="style/userindex.css" type="text/css" rel="stylesheet" />
<link href="style/base.css" type="text/css" rel="stylesheet" />
</head>
<body>
<script type="text/javascript">
var newItemNumber = 0;
function Addattr() {
var Mpara = document.getElementById("ProperName").value;
var Ipara = document.getElementById("ProperValue").value;
if (Mpara == "") {
alert('属性名称不能为空');
return;
}
if (Ipara == "") {
alert('属性值不能为空');
return;
}
var StrConne;
//原因 StrConne无法获取动态的document.getElementById("Stu" + i).value的值
//alert(document.getElementById("Stu" + i).value); 是可以弹出来的
var total = document.getElementById("totalNumber").value;
for (var i = 0; i < total + 1; i++) {
StrConne = document.getElementById("Stu" + i).value;
document.getElementById("totalNumbervalue").value = document.getElementById("Stu" + i).value;
}
alert(document.getElementById("totalNumbervalue").value);
alert(StrConne);
//window.location = "attrlayeredit.aspx?Mpara=" + Mpara + "&Ipara=" + Ipara + "";
}
function additem() {
var row, cell, str;
row = document.getElementById("tb").insertRow();
if (row != null) {
&