【发布时间】:2016-01-31 12:09:40
【问题描述】:
对此有很多答案,但我正在寻找特定于 reactjs 的东西
我的组件代码:
render: function () {
return (
<Modal {...this.props} title="Embed on your own site!">
<div className="modal-body">
<div className="tm-embed-container" dangerouslySetInnerHTML={{__html: embedCode}}>
</div>
<textarea className="tm-embed-code" rows="4" wrap="on" defaultValue={embedCode}></textarea>
</div>
</Modal>
);
}
});
脚本标签在页面上,但没有执行。我是否应该像其他答案所表明的那样,不做反应,只使用良好的 DOM 脚本?
【问题讨论】: