如何使用Javascript将光标聚焦在Textarea中

时间:2013-12-17 21:56:13

标签: javascript

我想将光标聚焦到特定的行。我正在使用此代码获取行号

taid=document.getElementById(element);
line = taid.value.substr(0, taid.selectionStart).split("\n").length;

然后我做了一些过程。之后,我想专注于“行”号码。我该怎么办?

谢谢。

0 个答案:

没有答案
相关问题