01.
<html>
02.
<head>
03.
</head>
04.
<body>
05.
<input type=
"text"
>
06.
<input type=
"text"
>
07.
<input type=
"text"
>
08.
<input type=
"text"
>
09.
<button>buttom</button><br>
10.
<input type=
"num"
id=
"sum"
>
11.
13.
<script>
14.
$( document ).ready(
function
() {
15.
button.on(
"click"
,
function
(){
16.
var
arr= null;
17.
$(
'input[type=text]'
).each(
function
(){
18.
arr+=parseInt($(this).val());
19.
})
20.
$(
'#sum'
).val(arr);
21.
$(
'#sum'
).focus();
22.
});
23.
</script>
24.
</body>
25.
</html>