<script type="text/javascript"> alert('Hola, esta variable proviene desde un formulario: Valor = <?php echo $_POST['variable']; ?>'); </script>