Re: Problème de passage de variable PHP/JS
ASM - <46741520$0$25937$ba4acef3@news.orange.fr> :
> fichier.php (variante) :
> <?
> $variable = $_GET['variable'];
> ?>
> <html>
> <script type="text/javascript">
> var blabla = '<?= $variable ?>';
> onload = function() {
> alert('variable = '+blabla);
> }
> </script>
Moi j'utilise plutot cette "variante".
|