How to copy text from one textbox to another using jQuery blur

Here is a questing I received

Hi
Help me on jquery blur event I need to copy data from one textbox to another textbox.


And my coded response:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.8.2.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#source').blur(function () {
                $('#destination').val($('#source').val());
                //alert('test');
            });
        });
    </script>
</head>
<body>
<form id="form1" runat="server">
    <asp:TextBox ID="source" runat="server"></asp:TextBox>
    <asp:TextBox ID="destination" runat="server"></asp:TextBox>
</form>
</body>
</html>

I hope this will help you. Thanks.

Comments

Post a Comment

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System