79304761

Date: 2024-12-24 05:05:56
Score: 1
Natty:
Report link

The answer given by @fuyushimoya is very poor quality and does not work the way you intended. If you actually wanted to sync them, you would have to ensure the value gets updated on input in either textarea.

<html>

<head>
  <title>Live Text Sync</title>
  <meta charset="utf-8" />
</head>

<body>
  <textarea id="a"></textarea>
  <textarea id="b"></textarea>
  <script>
    var a = document.getElementById("a");
    var b = document.getElementById("b");
    a.oninput = function(e) {
      b.value = a.value;
    }
    b.oninput = function(e) {
      a.value = b.value;
    }
  </script>
</body>

</html>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @fuyushimoya
  • Low reputation (1):
Posted by: April Hall