In my project, I really need to get the start position and the end position of the part of text that the user selects in a textfield or textarea of a form. One JavaScript funtion I write needs to know these two attributes to continue working. To get the position of a cursor in the textfield will be also useful. Anyway, I find DOM doesn't support this at all. Are there any other ways or tricks to get it? Thanks very much!