I have a textbox in index.html and I want get the value of it and put it to textbox in another html file which is result.html. (they have the same .js file using)
index.html textbox:
<input id="txt2" readonly="true" type="number" value="0" name="score" style="border:none;background-color:#f0f2f7">
result.html textbox:
<input id="txt3" readonly="true" type="number" value="0" name="score" style="border:none;background-color:#f0f2f7"></td>
this is the code where it will automatically go to the other page:
if((mins == 0) && (secs == 0)) {
//window.alert("Time is up.Your score is "+score); // change timeout message as required
document.getElementById('txt2').value = score;
window.location = "score.html" // redirects to specified page once timer ends and ok button is pressed
}
else {
cd = setTimeout("redo()",1000);
}
And how will txt3 get the value of txt2 since they are in different html?
Thanks in advance.