Would you like to crash FreeTextBox? Here is the trick. Visit the page http://freetextbox.com/demos/Default.aspx Click on HTML view and copy/paste the following code. Press “Save” button. This will convert your code into Note that “a” is missing. Pretty interesting!!! hmmmmmm….Now again click on HTML view and copy/paste following code Now you will see error….. Hurray…… […]
Note: In year 2021, this solution still works for textarea/input. Here is a working snippet of code to get and set the caret position in HTML textarea and textbox. This code works for IE 6, 7, 8, >=9, Edge, Chrome, Safari, Firefox and Opera.