首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

在script 里面如果给textbox控件附值解决方案

2012-02-21 
在script 里面如果给textbox控件附值scriptfunction jsDel(MonitorType){document.all.t_MonitorType.Te

在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了

热点排行