5
Hello I’m new here and I’m having a big doubt... I have this code:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h2>Este campo é diretamente automático</h2>
<input type="text" id="a"> oninput: <input type="text" id="a-1"><br><br>
<script>
/*Aqui é o campo 1*/
window.oninput = function(){
document.querySelector('#a-1').value = document.querySelector('#a').value;
};
</script>
</body>
</html>
and I’d like to know.. when I type in the first field the second is automatically filled but when I delete inside the first field the second is deleted right? but if we could do the same things in the second field? is it possible? if yes.. how?
I’m sorry I’m learning kkk started hj...sorry.. I’ve been in the help area but was not being very well informed
– Marcos José Silva
keep code written instead of print
– Amadeu Antunes
I’m sorry but I did that and one of the moderators blacked out
– Marcos José Silva
You cannot put "SOLVED" in the question. By marking in the answer that solved the problem, the question will be taken as solved.
– Sam
Ahh right Thank you very much :D
– Marcos José Silva
You can mark in only 1 reply, which you found most useful. If you don’t know how].
– Sam