-1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<style>
* ul li{
display: block;
margin-top: 10px;
}
</style>
<body>
<ul>
<li><label for="input">didite o numero de contas</label></li>
<li> <input type="number" id="input" placeholder=""></li>
<li><button onclick="enviar()">Enviar</button></li>
</ul>
</body>
<script>
function enviar(){
let txt = document.getElementById('input')
let input = Number(txt.value)
var tela = document.getElementById('visor')
// document.write('ok')
c = 1
while(c <= input){
//document.write('ok')
document.write(`<br><label>${c}ª Conta</label><br><input type="number" id="conta${c}"<br>`)
c++
}
document.write(`<br><button onclick="enviarContas()">Enviar</button>`)
}
function enviarContas(){
con = 1
while(con <= input){
//receber dados de input ${c}ªconta
}
}
</script>
</html>
How to receive data?
– Julio Henrique
I made a repeating structure that the person type the number of bills that have to pay ex: of course, tv, car, house [4] dai if creates 4 input number to receive the values of these [4]accounts and in the end could manipulate the data both add and multiply etc...
– Isaac Da Silva Correa
this @Isaac :D hope to have helped
– Julio Henrique