JS嵌套问题(大哥们帮我呀!)
JS嵌套问题(大哥们帮我呀!)a.aspx
document.writeln(\" <form id='form2' method='post' action='' enctype='multipart/form-data'>\");
document.writeln(\" <td style='width:50% ;'><input type='text' id='p0' name='p0' style='width: 217px'></td>\");
document.writeln(\" <input type='submit' ID='Button3' value='确定' />\");
document.writeln(\" </form>\");
a.aspx.cs
p0 = Request.Form["p0"] != null ? Request.Form["p0"].ToString() : "";
b.aspx
<script src="a.aspx" type="text/javascript"></script>
为什么得不到值呀!
把
a.aspx改为
<script>
document.writeln(\" <form id='form2' method='post' action='' enctype='multipart/form-data'>\");
document.writeln(\" <td style='width:50% ;'><input type='text' id='p0' name='p0' style='width: 217px'></td>\");
document.writeln(\" <input type='submit' ID='Button3' value='确定' />\");
document.writeln(\" </form>\");
</script>就可以得到值
为啥嵌套就不行了呢?
望大哥们帮小弟一把~ 小弟先谢了
补充:.NET技术 , C#