PHP et variable JavaScript
Bonjour, j'ai ce JS:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <script type="text/javascript">
if (document.body)
{
var larg = (document.body.clientWidth);
var Haut_JoHoK_JS = (document.body.clientHeight);
}
else
{
var larg = (window.innerWidth);
var Haut_JoHoK_JS = (window.innerHeight);
}
</script> |
Je voudrais récuprer le variable en PHP:
Code:
1 2 3
| <?php
$Haut_JoHoK = "<script> document.write(Haut_JoHoK_JS); </script>";
?> |
Pour l'utiliser dans un DIV
Code:
<div id="DIV_Menu_Masque_2" style="width:100%; height:<?php echo $Haut_JoHoK ; ?>px; overflow-y:scroll;" align="center" class="Div_Ovfl">
Mais là, ce ne fonctionne pas, pourriez vous m'aidez ?