Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
Its possible convert variable js in php?

I want to get the input in blur, but I don't know if it's possible to do this in php, so im doing in javascript to convert in php after, but im not getting

<!DOCTYPE html>
<html>

<body>

<h4>
    Change the text of the text field
    ,and then click the button.
</h4>

<label for="domTextElement">Name: </label>
<input type="text" onclick="getValueInput()" onblur="getValueInput()" id="domTextElement">

<form action="teste2.php" method="GET">
    <p <?php //$_SESSION['id'] = echo "<script>document.getElementById('valueInput').innerHTML</script>"; 
        ?> id="valueInput"></p>
</form>

<script type="text/javascript">
    const getValueInput = () => {
        let inputValue = document.getElementById("domTextElement").value;
        document.getElementById("valueInput").innerHTML = inputValue;

    }
</script>
<?php

$id = $_GET['valueInput'];
echo $id;
?>
</body>

</html>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda