Thanks the following codes. while in Firefox, you just need to invoke textElement.focus() method.
So here is how to position the caret end the end of a text field/text
area with IE4/5:
<script>
function setCaretToEnd (el) {
if (el.createTextRange) {
var v = el.value;
var r = el.createTextRange();
r.moveStart(&aposcharacter', v.length);
r.select();
}
}
function insertAtEnd (el, txt) {
el.value += txt;
setCaretToEnd (el);
}
</script>
ONCLICK="insertAtEnd (this.form.aText,
this.form.a2ndText.value);"
>
ONCLICK="insertAtEnd (this.form.aTextArea,
this.form.a3rdText.value);"
>
分享到:
相关推荐
How can I become a better writer.ppt
六年级Unit 1 How can I get there测试题精选.doc
1.2.1 How can I get/set an environment variable from a program? 1.2.2 How can I read the whole environment? 1.3 How can I sleep for less than a second? 1.4 How can I get a finer-grained version of...
3.4 How can I move the cursor around the screen? 我怎样将光标在屏幕里移动? http://archive.cnblogs.com/a/201848/(第 3/66 页)2011-12-20 9:55:10 Unix编程常见问题解答(FAQ / Frequently Asked Questions)...
3. How can a string variable called myString be converted to an all-capitals representation for future use? 4. Which activity can be used to loop through each row from a DataTable? 5. What key ...
33. What has to be considered when using liveCache in SAP HANA ...49. How can I provide input about useful SAP HANA features? 50. How can the historic growth of the SAP HANA database be determined?
By the end of the book, you will develop a practical application from the concepts learned, and will understand how text mining can be leveraged to analyze the massively available data on social media...
新人教PEP版六年级上册英语 unti 1 how can i get there? 全套课件.pptx
六年级上册英语课件-Unit1 How can I get there? B Let's learn-人教
In this paper, we carried out an empirical study to explore the logging practice in open source software projects so as to establish a basic understanding on how logging practice is applied in real ...
六年级上册英语第一单元How-can-I-get-there教案.pdf
Title: Load Cursor In Image With Show!Description: how to put a cursor in a image
How can I resolve "parsing go.mod: unexpected module path" and "error loading module requirements" errors caused by a mismatch between import paths vs. declared module identity? Why does 'go build' ...
The Illustrated Network How TCPIP Works in a Modern Network(2nd) 英文无水印原版pdf 第2版 pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权...
How to count the number of lines in a text file
* How can we draw a line?:回答绘画方法 * How can we read fast?:回答快速阅读方法 * Can you sing and dance?:回答是否能够唱歌和跳舞 * How can we get up early?:回答早晨起床方法 知识点:本部分考查学生...
unit How can I get to the nearest bankPPT学习教案.pptx
This shows how to retrieve the text from the current selection in a listbox.
Microcopy Discover How Tiny Bits of Text Make Tasty Apps and Websites 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除