-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc_feedback.js
More file actions
38 lines (37 loc) · 1.15 KB
/
func_feedback.js
File metadata and controls
38 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
okayElement = document.querySelector('.okay');
let date_n = '2000-01-01';
let number_n = '1';
let face = 'fiz';
let invest = ['swot'];
let add = 'add';
let pass = '0000';
let id = '0';
function save() {
date_n = document.getElementsByName('date_n')[0].value,
number_n = document.getElementsByName('number_n')[0].value;
pass = document.getElementsByName('pass')[0].value;
var face_n = document.getElementsByName('face');
var invest_n = document.getElementsByName('invest')
if (face_n[0].checked) {
face = face_n[0].value
} else {
face = face_n[1].value
}
invest = [];
for (var i = 0; i < 4; i++) {
if (invest_n[i].checked) {
invest.push(invest_n[i].value);
}
}
add = document.getElementsByName('add')[0].value
id = document.getElementsByName('id')[0].value
const num = document.getElementsByClassName('num')[0]
num.innerText = number_n;
const inv = document.getElementsByClassName('inv')[0]
var str = '';
for (var i = 0; i < invest.length; i++) {
str = str + invest[i] + ' ';
}
inv.innerText = str;
}
okayElement.addEventListener('click', save);