Hi,
how to get the value of textbox and copy to other textbox,
i just confuse thx
how to get the value of textbox and copy to other textbox,
i just confuse thx
Code:
<!DOCTYPE html>
<html>
<head>
<script>
function getValue()
{
var x=document.getElementById("myHeader");
var y=document.getElementById("y");
x.value = y.value;
alert(x.innerHTML);
}
</script>
</head>
<body>
<h1 id="myHeader" onclick="getValue()">Click me!</h1>
<h1 id="y">me!</h1>
</body>
</html>
Comment