2014-09-23 92 views
1

我想設置特殊字符的字段的.val(),但它不顯示輸入特殊字符輸入:jQuery的 - 有特殊字符

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

這是我輸入:
enter image description here

我該如何解決這個問題?

回答

1

確保您的文檔正在使用UTF8編碼。加入到你的HTML <head>

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

我不能編輯''。我只能使用JavaScript。所以我試着這樣做:$(「head」).append('');但沒有工作 – Thiago 2014-09-23 16:41:45

+0

你在做這個腳本之前或之後做了嗎?另外,腳本是內嵌還是外部加載? – Scimonster 2014-09-23 16:51:52

+0

我的確如此: Thiago 2014-09-23 16:52:53