Baseline Widely available
selectionStart
㯠HTMLTextAreaElement
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ããããã£ã§ã <textarea>
è¦ç´ å
ã«ãããç¾å¨ã®ããã¹ã鏿ç¯å²ã®å
é ã®ä½ç½®ãæå®ãã¾ããããã¯ã鏿ãããããã¹ãã®æåã®ã¤ã³ããã¯ã¹ãè¡¨ãæ°å¤ã§ãã <textarea>
ã®é¸æãããããã¹ãã®æåã®ã¤ã³ããã¯ã¹ãåå¾ããããè¨å®ãããããéã«ä½¿ç¨ãããã¨ãã§ãã¾ãã
ä½ã鏿ããã¦ããªãå ´åã selectionStart
ããã³ selectionEnd
ã®å¤ã¯ãã©ã¡ãã <textarea>
è¦ç´ å
ã®ã«ã¼ã½ã«ï¼ãã£ã¬ããï¼ã®ä½ç½®ã«ãªãã¾ãã
selectionStart
ãç¾å¨ã® selectionEnd
ã®å¤ãã大ããªå¤ã«è¨å®ããã¨ãselectionStart
㨠selectionEnd
ã®ä¸¡æ¹ã®ããããã£ããã®å¤ã«æ´æ°ããã¾ãã ã©ã¡ãã®å¤ã textLength
以ä¸ã®å ´åã両æ¹ã®ããããã£ã textLength
ããããã£ã®å¤ã«è¨å®ããã¾ãã
ãã®ããããã£å¤ã¯ããã® <textarea>
ã«ãã©ã¼ã«ã¹ããªãã¦ãåå¾ãããè¨å®ããããããã¨ãã§ãã¾ãããè¦ç´ ã«ãã©ã¼ã«ã¹ããªãã¨ã ::selection
æ¬ä¼¼è¦ç´ ã鏿ããã¹ãã¨ä¸è´ãã¾ããã
selectionStart
ãæ°ããå¤ã«è¨å®ããã¨ã selectchange
ããã³ select
ã¤ãã³ããçºçãã¾ãã
éè² ã®æ°å¤ã§ãã
ä¾const textarea = document.getElementById("text-box");
const start = textarea.selectionStart;
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4