日期:2014-05-18  浏览次数:20961 次

在script 里面如果给textbox控件附值
<script>
function jsDel(MonitorType)
{
document.all.t_MonitorType.Text = MonitorType;//这样写有借吗,总是提示出错
}
</script>
<body>
<td><asp:TextBox ID="t_MonitorType" Runat="server" Visible="False"></asp:TextBox></td></body>

------解决方案--------------------
document.all.t_MonitorType.value = MonitorType;
------解决方案--------------------
你使用 <input type="text" id="t_MonitorType" runat="server"> 你就可以在script里面负值了 注意的是后台代码调用的时候是用的 t_MonitorType.value 不是t_MonitorType.text了