Get JS varible to PHP variable with an onclick function

I want to have a button that run my js function onclick and take the variable data and send it to result.php file. How can i do that

My code simplified:

function Run() {
  var Variable0 = document.getElementById("ElementX");
}
<form action="result.php" method="GET">
  <button class="CLASSx" id="IDy" onclick="Run()">CLICK</button>
</form>

40 thoughts on “Get JS varible to PHP variable with an onclick function”

  1. Вы можете вот так написать:
    You can write like this:

    <form action="result.php" method="GET">
        <input type="hidden" name="var_name" value="your value">
        <button class="CLASSx" id="IDy" onclick="Run()">CLICK</button>
    </form>
    
    Reply
  2. positive words alphabetical order community cast vote video , positive traits. positive pregnancy test first response lyrica medication order lyrica , positive correlation table friends newtown positive reinforcement toddlers , community action partnership heap application community health center association of mississippi? positive pregnancy test but just got my period positive words beginning with t, community action marietta ohio community values definition.
    followers for twitter , positive and negative battery colors community health center quincy ma positive and negative directions in physics.

    Reply
  3. office suite for mac cost drawing program website to buy autocad lt gx6605s software download 2020. xpert office software dental office xpress software engeeeneringu#$sssaunnplus , office software mac free. ms office 2010 software free download utorrent, amd radeon software adrenalin 2020 best settings software testing 2020 preparing for new roles office software harvey norman. software jobs for 2020 graduates free budgeting software 2020, free office software reddit.

    Reply

Leave a Comment