Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to concatenate two textbox values in JavaScript

<!DOCTYPE html>
<html>
<body>
    <input type="text" id="Num1" value="1" onblur="reSum();"/>

    <input type="text" id="Num2" value="1" onblur="reSum();"/> <br>
    <p>Auto Sum</p>

    <input type="text" id="Sum" value=""/>
    <script>

        function reSum()
        {
            var num1 = parseInt(document.getElementById("Num1").value);
            var num2 = parseInt(document.getElementById("Num2").value);
            document.getElementById("Sum").value = num1 + num2;

        }

    </script>
</body>
</html>
Source by tutorial.eyehunts.com #
 
PREVIOUS NEXT
Tagged: #How #concatenate #textbox #values #JavaScript
ADD COMMENT
Topic
Name
5+8 =