0
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>

<label>Spalten eingeben:
        <input id="inpSpalte" type=number >
</label>
<label>Zeilen eingeben:     
        <input id="inpZeile" type=number >
</label>

<button type="button" id="MachTabelle">Tabelle erstellen</button>
</body>

<script src="functest.js"></script>
</html>




document.getElementById("MachTabelle").addEventListener("click", gemuese(parseInt(document.getElementById("inpZeile").value),parseInt(document.getElementById("inpSpalte").value)), false);
    
    
    function gemuese(x, y)
    {
    var result=x+y;
    console.log(result);
    };

Hey there:) for now I need to give input data as parameteres to a function and call it on buttonpress, the next bigger goal is to put array rows and colums into the inputs, create an array and display it as a table ("kind of" got that figured out but cant do the "simple" parameter thing...) Im looking forward for any help or improvement ideas:)

Yuuuhu
  • 35
  • 5
  • 1
    [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) - The title should give a short summary of the actual problem. First introduce the problem/question and then show the relevant code (preferable a [mcve] as an [executable snippet](https://meta.stackoverflow.com/questions/358992/ive-been-told-to-create-a-runnable-example-with-stack-snippets-how-do-i-do)) – Andreas Jul 01 '20 at 14:27
  • the js code at the bottom is in another file in the same folder, called functest.js – Yuuuhu Jul 01 '20 at 14:27

0 Answers0