gpt4 book ai didi

javascript - textarea.selectionStart 在 IE 中

转载 作者:行者123 更新时间:2023-11-28 00:29:53 25 4
gpt4 key购买 nike

使用这段代码,我可以检查 Firefox 中文本区域中的插入符位置:

document.getElementById("myTextArea").selectionStart

这在 IE 8 中不起作用。如何在 IE 8 中获取插入符位置?

最佳答案

请在此处查看答案:Caret position in textarea, in characters from the start

编辑

我整理了 IE 中的换行问题,并在这里发布了一个答案:Caret position in textarea, in characters from the start

关于javascript - textarea.selectionStart 在 IE 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2628323/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com