简体   繁体   中英

How do I remove crlf in IE between string in text box

I have a simple text box. And for debugging purpose I have a submit button. Now when I write something in text box and click submit button I am printing content of the text box and its all fine. But when I copy the text from excel document it works fine if they are in horizontal row format but when I copy paste things from vertical column format only the first string is shown up in text box and submit prints only the first text in Internet Explorer. It works fine in Chrome and Firefox. When I copy pasted the vertical string in Notepad++ I see that they are determinates by CRLF. So I am curious how would I get all the content as in chrome. In chrome when I copy paste the same things all the string are visible in text box and it prints fine.

Copying and pasting from an application into a web browser is a can of worms. Some browsers have a "Paste as plain text" option which strips out special control characters. IE doesn't appear to have that option. Microsoft claims that CTRL+V will paste as-is, and Edit->Paste will paste as plain text. This has never worked for me.

tl;dr: You remove them in another application before pasting into IE.

Resources:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM