b581102
شنبه 12 مرداد 1387, 09:30 صبح
سلام . من کد زير را استفاده می کنم ولی متن Label هيچ تغييری نمی کند .
<body>
<script type="text/javascript" language="javascript">
function Select()
{
var el = document.getElementById('<%=txbTest01.ClientID %>');
var al = document.getElementById('<%=lblValue.ClientID %>');
al.value = el.value ;
}
</script>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblValue" runat="server"></asp:Label><br />
<asp:TextBox ID="txbTest01" runat="server"></asp:TextBox><br />
<img src="images/bu01.gif" onclick="Select();" />
</div>
</form>
</body>
<body>
<script type="text/javascript" language="javascript">
function Select()
{
var el = document.getElementById('<%=txbTest01.ClientID %>');
var al = document.getElementById('<%=lblValue.ClientID %>');
al.value = el.value ;
}
</script>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblValue" runat="server"></asp:Label><br />
<asp:TextBox ID="txbTest01" runat="server"></asp:TextBox><br />
<img src="images/bu01.gif" onclick="Select();" />
</div>
</form>
</body>