我想在点击按钮后动态创建iframe特定的url和className。 我开始使用react,我不知道该怎么做。
答案 0 :(得分:0)
您不需要做任何特别的事情:
var Iframer = React.createClass({
render: function() {
return <iframe src="https://www.google.com" className="my-iframe" />
}
})
React.render(<Iframer />, document.getElementById('container'));
小提琴: