谁能告诉我同一页面有两个控件 在表格外还有个Label 要鼠标移上这TD上 Label随之变值 用javascript代码谁能告诉我
<script language= "javascript " >
<!--
function show_id()
{
document.Form1.Label.value =document.Form1.tbx.value;
}
//-- >
</script >
…………
<td onmouseover="show_id()">
<asp:TextBox ID=tbx Text='<%# DataBinder.Eval(Container,"DataItem.SI_CODE") %>' Runat=server>
</asp:TextBox>
</td></tr></table>
</ItemTemplate>
</asp:TemplateColumn>
/Columns>
</asp:datagrid>
<asp:Label id="Label" runat="server"></asp:Label>
该如何修改?谢谢
<script language= "javascript " >
<!--
function show_id()
{
document.Form1.Label.value =document.Form1.tbx.value;
}
//-- >
</script >
…………
<td onmouseover="show_id()">
<asp:TextBox ID=tbx Text='<%# DataBinder.Eval(Container,"DataItem.SI_CODE") %>' Runat=server>
</asp:TextBox>
</td></tr></table>
</ItemTemplate>
</asp:TemplateColumn>
/Columns>
</asp:datagrid>
<asp:Label id="Label" runat="server"></asp:Label>
该如何修改?谢谢
这个不用改
把document.Form1.Label.value =document.Form1.tbx.value;
改为:document.all.Label.text =document.all.tbx.text;看