문제

I got a problem with this little code from a popup

function edit(titre,texte) {
    window.opener.document.getElementById('corp').innerHTML +=
            '<h2>'+titre.value+'</h2> <p>'+texte.value+'</p>';
    window.close();
}

Nothing happens when this script is launched. I want to change the contents of myDiv in the opener window.

I'm using Chrome.

올바른 솔루션이 없습니다

다른 팁

Opener is property of the window, not of the document, so it should be:

window.opener.document...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top