-3
I’m looking to make a sum of all the notes with input
, added by JQuery
,I just can’t get values from JQuery
when I press the button +
, wanted to know how I can take the values of JQuery
when I press the plus button and type in a number,.
Click to see the image in its original size
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ex001</title>
<script src=" https://code.jquery.com/jquery-3.5.1.min.js"></script>
<style>
.qtd {
margin-top: 5px;
}
</style>
</head>
<body>
<h2>Média de notas</h2>
<div id="form">
<input type='number' class="qt" id="qt1" placeholder="Nota">
<input type="button" class='botão' id="b" value="+">
<input type="button" class='finalizar' value='Finalizar' onclick="finalizar()">
<script>
$('#b').click(function() {
var gua = $('#form').append('<input type="text" class="qta" id="qtd" placeholder="Nota"> ').val()
window.alert(gua)
})
function finalizar() {
}
</script>
</body>
</html>
https://api.jquery.com/val/
– Sorack
thanks bro, was looking wrong
– BrUNo B.