how to get the value of a textbox in some other textbox by javascript..
for example :
if we put 100 in textbox1 so the value that will come in textbox2 should be less o equal to the 100(i.e, value of textbox1) by clicking event of textbox2.
how to get this value please give the solution sir.

Ranjit PowarPosted Feb 2, 2016, 2:57 AM
$('#textbox2').click(function (){
var value=$('#textbox1').val();
$('#textbox2').val(value);
});
If it helps you, select it as correct answer.
Shubham KumarPosted Feb 2, 2016, 1:25 AM
{
var fistInput = document.getElementById("#firsttextbox").value;
var secondInput = document.getElementById("#secondtextbox").value;
if(firstInput == secondInput)
{
document.getElementById("#secondtextbox").value=fistInput;
}
else if(firstInput > secondInput)
{
document.getElementById("#secondtextbox").value=fistInput;
}
}
in asp.net replace input to asp:textbox
parul jainPosted Feb 2, 2016, 12:57 AM
Shubham KumarPosted Feb 2, 2016, 12:36 AM
Pankaj Kumar ChoudharyPosted Feb 2, 2016, 12:34 AM
document.getElementById("txt2").value=document.getElementById("txt1").value;
}