Hello Fam Am a newbie am trying to get each input box seperately with js pls i need help

<!doctype html>
    <!-- <input type="number" value="1" id="demo"> -->
      for ($i=0; $i <= 5 ; $i++) { 
       Number <?php echo $i;?>: <input type="number" id="myNumber">
    <button onclick="myFunction()">Try it</button>
    <button onclick="myFunction1()">Try it</button><br>
       # code...

function myFunction() {
function myFunction1() {

All your inputs have the same ID. getElementByID() cannot distinguish between them.

I am not sure what you are trying to accomplish, pleas explain. You might need to use a different function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.