How to pass one label value to another label in javascript

Posted by Murugavelmsc under JavaScript on 2/27/2013 | Points: 10 | Views : 4093 | Status : [Member] | Replies : 2
How to pass one label value to another label in javascript

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Satyapriyanayak on: 2/27/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
http://stackoverflow.com/questions/5896287/jquery-passing-value-from-one-input-to-another

If this post helps you mark it as answer
Thanks

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 2/28/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

murugavel

try this

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>

<script>
function TestLb() {
var tt = document.getElementById("lbl1").innerHTML;
document.getElementById("lbl2").innerHTML = tt;return false;
}
</script>


<body>
<form id="form1" runat="server">
<asp:Label ID="lbl1" runat ="server" Text ="Jesus"></asp:Label>
<asp:Label ID="lbl2" runat ="server" Text =""></asp:Label>

<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" OnClientClick ="return TestLb();" />
</form>
</body>
</html>



mark at answers if this help.

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response