I have a text box where i need to load the data when form is loaded. In "G6data" variable i am getting the value 100 but it is not getting populated in G6 text box. How can i populate the data which i got into input box using getElementByID. Please help
<!DOCTYPE html>
<html>
<body onload="myFunction()">
<input type="text" id="f6" value="5000" />
<input type="text" id="G6" value="" />
<button >Try it</button>
<script>
function myFunction()
{
var F6=document.getElementById("F6").value;
var as6=calculateAS6(F6);
var as4=CalculateAS4(as6);
var G6data=AveragePercentage(as6,as4);
document.getElementById("G6").innerHTML=G6data;
}
</script>
</body>
</html>