79310717

Date: 2024-12-27 01:17:43
Score: 1
Natty:
Report link

In case you ever don't care how the textarea was emptied, you can get this behavior with CSS alone:

#getcss:has(+ textarea:invalid) {
  border: 1px solid red;
}
<div id="getcss">html contents</div>
<textarea name="new" id="message" required>text content</textarea>

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: soandso