i need to sum anything that is input in input form numbers. And this has to be in order like 5,4,3 and then it has to sum like 5+4+3 = 12. Can anyone help? I came as far as the code shows above.
this is the example of how it should be: link
thanks
The code:
<html>
<head>
<title>Vaja 6.2</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type='text/javascript'>
function preveri(elem)
{
var iskanje=prompt("Vnesi iskano stevilo:");
var numericExpression = iskanje;
if (elem.value.match(numericExpression))
{
alert('Stevilo je v seznamu');
}else
{
alert('Stevilo ni v seznamu');
}
}
function sestej()
{
document.getElementById(numbers);
document.write(numbers);
}
</script>
</head>
<body >
<form>
<input type='text' id='numbers'/>
<input type='button' onclick="preveri(document.getElementById('numbers'))", value='Išči' />
</form>
<script>
sestej();
</script>
</body>
</html>