I want to create inputs with javascript and read the value of it. it works fine as long as the input isn't disabled. But the user shouldn't be able to edit the input. How can I disable the inputs without making the value invisible to to javascript?
let input = document.createElement('input');
input.name = "tags[]";
input.value = data;
input.disabled = true;
myNode.appendChild(input);
var inputs = document.querySelectorAll("input[name='tags[]']");
const active = [];
for (i = 0; i < inputs.length; i++) {
active.push(inputs[i].value.toLowerCase());
}