HTMLTextAreaElement: selectionDirection 屬性
HTMLTextAreaElement 介面的 selectionDirection 屬性指定了當前選擇的方向。可能的值包括 "forward"、"backward" 和 "none"。forward 值表示選擇是以當前區域設定的從開始到結束的方向進行的,而 backward 則表示相反的方向。如果方向未知,則會發生 none 值。它可以用於檢索和更改 <textarea> 選中文字的方向。
將 selectionDirection 設定為新值會觸發 selectionchange 和 select 事件。