Lugarini
Lugarini

Reputation: 802

jQuery - input with special characters

I am trying to set the .val() of a field with special characters, but it doesnt show the special characters in the input:

$( "input" ).val( "Justifique as propostas não escolhidas e insira observações para as escolhidas." );

this is my input:
enter image description here

How can I solve this?

Upvotes: 1

Views: 175

Answers (1)

Scimonster
Scimonster

Reputation: 33409

Make sure your document is using UTF8 encoding. Add this to your HTML <head>:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

Upvotes: 1

Related Questions