Penny94
10-14-2012, 11:49 PM
How do I get the text from a textbox into a variable?
I am trying to make it so onclick text from one textbox is put into another:
<script type="text/javascript">
var test= ???
function movetext(){
document.getElementById("text2").value=test;
}
</script>
<a onclick="movetext(); return false;">Click</a>
<input type="text" id="text1"><br><br>
<input type="text" id="text2">
Thanks for your help
I am trying to make it so onclick text from one textbox is put into another:
<script type="text/javascript">
var test= ???
function movetext(){
document.getElementById("text2").value=test;
}
</script>
<a onclick="movetext(); return false;">Click</a>
<input type="text" id="text1"><br><br>
<input type="text" id="text2">
Thanks for your help