frames
collection or any input
s don't exist at the time you try to refer them. You can try this:
window.onload = function () {
alert(window.frames["frame1"].document.getElementsByTagName("input")[0].value;
}
Notice, that frames
collection contains window
objects instead of frame/iframe
elements.