<html> <script type="text/javascript"> var p; function ouinon(x) { pere.choix.value=x; p.close(); } function popup() { p= window.open('','choix1','width=150,height=100,menubar=no,status=no'); p.document.writeln('<html><center>'); p.document.writeln('<form name="pChoix">'); p.document.writeln(''); p.document.writeln(''); p.document.writeln('</form></center></html>'); p.document.close(); } </script> <form name='pere'> </form> </html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<html> <script language="javascript"> function oui(x){ var choix=x.document.forms["pChoix"].elements["bouton1"].value; window.opener.document.forms["pere"].elements["choix"].value=choix;} function non(x){ var choix=x.document.forms["pChoix"].elements["bouton2"].value; window.opener.document.forms["pere"].elements["choix"].value=choix; } function popup(){ var p = window.open('popup.html','choix','width=150,height=100'); } </script> <form name='pere'> </form> </html>
<html> <script language="javascript"> function oui(x){ var choix=x.document.forms["pChoix"].elements["bouton1"].value; window.opener.document.forms["pere"].elements["choix"].value=choix;} function non(x){ var choix=x.document.forms["pChoix"].elements["bouton2"].value; window.opener.document.forms["pere"].elements["choix"].value=choix; } </script> <form name="pChoix" onClick="window.close()"> </form> </html>