En primer lugar, ninguna pregunta de Jquery e iframe NO resuelve mi pregunta, no se dirija a ella. Ni siquiera entiendo eso, acabo de empezar a aprender javascript hoy. Quiero cambiar la imagen en el marco derecho haciendo clic en un botón en el marco de mi cabeza. También intenté usar contentWindow, no funcionó. El script de imagen cambiante funciona para el mismo marco, hay un problema al acceder a otros marcos, mi versión de javascript es 1.7
índice.html
<!DOCTYPE html> <html lang="tr" dir="ltr"> <head> <meta charset="utf-8"> <title>Title</title> </head> <frameset rows="30%, 70%" noresize> <frame id="head" name="head" src="head.html"> <frameset cols="50%, 50% noresize"> <frame id="left" name="left" src="left.html"> <frame id="right" name="right" src="right.html"> </frameset> <body> <script type="text/javascript"> window.frames['head'].document.getElementById('button1').addEventListener('click', () => { window.frames['right'].document.getElementById('image1').src = ('https://www.planetware.com/wpimages/2020/04/iceland-best-waterfalls-seljalandsfoss.jpg'); }) </script> </body> </html>cabeza.html
<!DOCTYPE html> <html lang="tr" dir="ltr"> <head> <meta charset="utf-8"> <title></title> </head> <body> <h1>Site Title</h1> <button name="button1" id="button1">Next</button> </body> </html>derecho.html
<!DOCTYPE html> <html lang="tr" dir="ltr"> <head> <meta charset="utf-8"> <title></title> </head> <body> <img src="https://learnenglishteens.britishcouncil.org/sites/teens/files/styles/article/public/field/image/rs930_135120665-low.jpg?itok=g5LI5W4C" alt="picture" id ="image1" name="image1"> </body> </html>así es como se ve el sitio cómo se ve