简体   繁体   中英

jQuery - textarea value get converted

I have a texture where the user can write a small description. What I am trying to achieve is that while the user is typing another element text h2 gets update.

everything works except that when the user uses specials characters such as è é æ emoticons etc they get converted in the h2 element.

For example if I type è it gets converted to e .

fiddle

 $('.dashTextArea').keyup(function() {
   var stt = $(this).val();
   $(".myDesc").text(stt);

 });

For me, these "special" characters work and are well displayed. I think it's probably the encoding settings of your browser/webpage.

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