我試圖呈現一個元素,內容口音字符,使用ReactJS
和JSX,但它不回來時,我想如何在ReactJs中渲染重音符號?
我的JSX:
var Orcamento = React.createClass({
render: function() {
return (
<div>
<h1>Orçamento</h1>
</div>
);
}
});
React.render(
<Orcamento/>,
document.getElementById("orcamento")
);
我呈現的javascript:
var Orcamento = React.createClass({displayName: "Orcamento",
render: function() {
return (
React.createElement("div", null,
React.createElement("h1", null, "Orçamento")
)
);
}
});
React.render(
React.createElement(Orcamento, null),
document.getElementById("orcamento")
);
而我在瀏覽器中的結果:
Orçamento
我已經在你的head
標籤設置<meta charset="UTF-8">
,重音字符是工作在網頁標題和頁面主體,如果這個詞在你的內容直接輸入,但是當它是由ReactJs
我如何能解決這個問題變得不工作問題?
我只是複製你的代碼,並提出了的jsfiddle:http://jsfiddle.net/wiredprairie/h2k2ksm3/。它可以像你期望的那樣在那裏工作。 – WiredPrairie 2015-04-06 15:12:46