JS获得动态加入的文本框的值
varlogb;logb="<legendstyle=\"font-size:12pt;color:#FF66FF;\">用户登陆</legend><formname=\...
var logb;
logb = "<legend style=\"font-size:12pt;color:#FF66FF;\">用户登陆</legend><form name=\"Loginform\" method=\"post\" action=\"\" onsubmit =\"UserLigin();return false;\"><label for=UserName>用户名:</label><input name=\"UserName\" type=\"text\" id=\"UserName\" style=\"font-size:10pt;color:blue;background-image:url(images/label.png);background-attachment:fixed;height:20px;width:138px;\" maxlength=\"20\"/><br><br><label for=UserPass>密 码:</label><input name=\"UserPass\" type=\"password\" id=\"UserPass\" style=\"font-size: 9pt;background-image: url(images/label.png);background-attachment:fixed;height: 20px;width: 138px;\" maxlength=\"20\"/><br><br><font style=\"font-size:13pt;\">还没<a href=\"reg.php\">注册</a> ※ <a href=\"getpass.php\">找回密码</a></font><br><br><input type=\"submit\" style=\"FONT-SIZE: 9pt; LINE-HEIGHT: 15px;border-width:1;border-color:#E3E3E3; FONT-FAMILY: Tahoma,Verdana,宋体\" name=\"Submit\" value=\" 提 交 \"><input style=\"FONT-SIZE: 9pt; LINE-HEIGHT: 15px;border-width: 1; border-color: #E3E3E3; FONT-FAMILY: Tahoma,Verdana,宋体\" name=\"Reset\" type=\"reset\" id=\"Reset\" value=\" 重 置 \"><br></form>";
document.getElementById("UserMst").innerHTML = logb;
请问怎么用JS获得上面表单中的数据? 展开
logb = "<legend style=\"font-size:12pt;color:#FF66FF;\">用户登陆</legend><form name=\"Loginform\" method=\"post\" action=\"\" onsubmit =\"UserLigin();return false;\"><label for=UserName>用户名:</label><input name=\"UserName\" type=\"text\" id=\"UserName\" style=\"font-size:10pt;color:blue;background-image:url(images/label.png);background-attachment:fixed;height:20px;width:138px;\" maxlength=\"20\"/><br><br><label for=UserPass>密 码:</label><input name=\"UserPass\" type=\"password\" id=\"UserPass\" style=\"font-size: 9pt;background-image: url(images/label.png);background-attachment:fixed;height: 20px;width: 138px;\" maxlength=\"20\"/><br><br><font style=\"font-size:13pt;\">还没<a href=\"reg.php\">注册</a> ※ <a href=\"getpass.php\">找回密码</a></font><br><br><input type=\"submit\" style=\"FONT-SIZE: 9pt; LINE-HEIGHT: 15px;border-width:1;border-color:#E3E3E3; FONT-FAMILY: Tahoma,Verdana,宋体\" name=\"Submit\" value=\" 提 交 \"><input style=\"FONT-SIZE: 9pt; LINE-HEIGHT: 15px;border-width: 1; border-color: #E3E3E3; FONT-FAMILY: Tahoma,Verdana,宋体\" name=\"Reset\" type=\"reset\" id=\"Reset\" value=\" 重 置 \"><br></form>";
document.getElementById("UserMst").innerHTML = logb;
请问怎么用JS获得上面表单中的数据? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询