Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#anzahlProzesse").change(function () {
- let counter = $('#anzahlProzesse').val();
- for (let i = 1; i <= counter; i++) {
- let row3 = $("<tr><td>" + i + "</td><td>" + "<input
- type='number' id='prozess" + i + "'></input>" + "</td><tr>");
- $("#sjftable").append(row3);
- }
- $("#berechnen").show();
- });
- This should be done after clicking the #berechnen-button:
- $("#berechnen").click(function () {
- let cpuLaufzeit = [];
- let ankunftszeit = [];
- let anzahlProzesse = $('#anzahlProzesse').val();
- for (let i = 1; i <= anzahlProzesse; i++) {
- let cpu = $("*prozess" + i).val();
- cpuLaufzeit.push(cpu);
- }
- console.log(cpuLaufzeit);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement