<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<style>
</style>
<body>
<p><input type="text" id="veri1" name="veri1"></p>
<p><input type="text" id="veri2" name="veri2"></p>
<p id="demo"></p>
<script type="text/javascript">
var result=document.getElementById("demo");
times=setInterval(toplam, 1000);
function toplam(){
var data1, data2,sonuc;
data1=Number(document.getElementById("veri1").value);
data2=Number(document.getElementById("veri2").value);
sonuc=data1+data2;
result.innerHTML=sonuc;
}
</script>
</body>
</html>