1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
</head><body>
<iframe src="2.html"></iframe>
<form action="" method="post" name="formularnavn">
<input type="text" name="input1" value="ok">
</form>
</body></html>
2.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<script type="text/javascript">
function val(){
var1=parent.document.formularnavn.input1;
var1.value='nyt indhold';
}
</script>
</head><body>
<b onclick="val();">Klik her</b>
</body></html>