![](/img/trans.png)
[英]Why is document.getElementById('foo').value not a reference?
[英]document.getElementById(foo).value with html encoded special characters?
我似乎無法在一個簡單的輸入文本字段中正確渲染特殊字符。 例如以下
é
應該是é,但呈現為原始值
document.getElementById("inputKeyword").value ="Cherchez par mot clé"
那是html編碼,在javascript中沒有用。
document.getElementById("inputKeyword").value = "Cherchez par mot clé";
要么
document.getElementById("inputKeyword").value = "Cherchez par mot cl\u00e9";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.