Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
51
rated 0 times [  58] [ 7]  / answers: 1 / hits: 21515  / 14 Years ago, thu, july 1, 2010, 12:00:00

how can i transfer the Value from Input 1 in 2 and add some letters?



<script type=text/javascript>

function doit(){
document.getElementById('input2').value=document.getElementById('input1').value;
}

</script>


Input1: 2342



Input2: pcid2342d



Can some one help me?


More From » html

 Answers
3

Just use the + operator to add a string before and after the input value.



<script type=text/javascript>

function doit(){
document.getElementById('input2').value=pcid + document.getElementById('input1').value + d;
}

</script>

[#96364] Monday, June 28, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byrondonavanc

Total Points: 675
Total Questions: 107
Total Answers: 105

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
byrondonavanc questions
;