我有我使用來填充表單元素(與jQuery),該JavaScript對象:奇怪不可選擇字符
var attribute = { name : '̈́Type' };
$('#container').html('<input type="text" value="'+attribute.name+'/>');
但輸出顯示奇怪的字符是不可選擇:
這個字符當嘗試也存在:
alert(attribute.name); //in Firefox
console.log(attribute.name); //in Chrome
我的JavaScript文件使用UTF8編碼。
這是什麼性格,我該如何讓它消失?
'name:'̈Type''你在屬性文本中有該字符。如果你不想要它 - 刪除它。 –