I've Searched The Web So Much But For Some Reason, My Code = No Work;
My JavaScript:
let a = document.getElementById("a");
let b = document.getElementById("b");
let c = document.getElementById("c");
let button = document.getElementById("button");
button.onclick = function() {
var info = {"a": a.value, "b": b.value, "c": c.value};
console.log(info.a + info.b + info.c);
}
Everything Except The C One Works, Which Is A Dropdown(A And B Are Textboxes).
HTML:
<button type = "button" id = "button">Button</button>
<input type = "text" id = "a">
<br><br>
<input type = "text" id = "b">
<br><br>
<select name = "c" class = "c">
<option value = "c1" class = "c" selected>c1</option>
<option value = "c2" class = "c">c2</option>
<option value = "c3" class = "c">c3</option>