Setting a multiline value of Text Input Field

This behaves differently on FF vs IE. If you do:

textInput.value = "line one\nline two";


Where textInput is an input element with type="text". FF ignores the second line and sets the value to the contents of the first line, whereas IE removes the newlines and merges all the lines into one.

blog comments powered by Disqus