第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

imooc-react入門課程代碼--20170424

<!DOCTYPE html>
<html>
<head>
? ?<meta charset="utf-8">
? ?<title>imooc-react入門課程代碼</title>
? ?<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script>
? ?<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script>
? ?<style>
body{
? ? ? ? ? ?color:#f00;
? ? ? ?}
? ?</style>
</head>
<body>
? ?<div id="container"></div>
? ?<script type="text/jsx">
var TestClickComponent=React.createClass({
? ? ? ? ? ?handleClick:function (event) {
? ? ? ? ? ? ? ?var tipE=React.findDOMNode(this.refs.tip);
? ? ? ? ? ? ? ?if(tipE.style.display==='none'){
? ? ? ? ? ? ? ? ? ?tipE.style.display='inline';
? ? ? ? ? ? ? ?}else{
? ? ? ? ? ? ? ? ? ?tipE.style.display='none'
}
? ? ? ? ? ? ? ?event.stopPropagation();
? ? ? ? ? ? ? ?event.preventDefault();
? ? ? ? ? ? ? ?var colorE=React.findDOMNode(this.refs.color);
? ? ? ? ? ? ? ?if(colorE.style.display==='none'){
? ? ? ? ? ? ? ? ? ?colorE.style.display='inline';
? ? ? ? ? ? ? ?}else{
? ? ? ? ? ? ? ? ? ?colorE.style.display='none'
}
? ? ? ? ? ?},
? ? ? ? ? ?render:function () {
? ? ? ? ? ? ? ?return(
<div>
? ? ? ? ? ? ? ? ? ? ? ?<button onClick={this.handleClick}>顯示|隱藏</button><span ref="tip">測試點(diǎn)擊</span>
? ? ? ? ? ? ? ? ? ? ? ?<span ref="color">測試點(diǎn)擊后的顏色</span>
? ? ? ? ? ? ? ? ? ?</div>
);
? ? ? ? ? ?}
? ? ? ?});
? ? ? ?var TestInputComponent=React.createClass({
? ? ? ? ? ?getInitialState:function () {
? ? ? ? ? ? ? ?return{
? ? ? ? ? ? ? ? ? ?inputContent:'默認(rèn)'
}
? ? ? ? ? ?},
? ? ? ? ? ?changeHandler:function (event) {
? ? ? ? ? ? ? ?this.setState({
? ? ? ? ? ? ? ? ? ?inputContent:event.target.value
? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ?event.stopPropagation();
? ? ? ? ? ? ? ?event.preventDefault();
? ? ? ? ? ?},
? ? ? ? ? ?render:function () {
? ? ? ? ? ? ? ?return(
<div>
? ? ? ? ? ? ? ? ? ? ? ?<input type="text" onChange={this.changeHandler}/><span>{this.state.inputContent}</span>
? ? ? ? ? ? ? ? ? ?</div>
)
}
? ? ? ?});
? ? ? ?React.render(
<div>
? ? ? ? ? ? ? ?<TestClickComponent/>
? ? ? ? ? ? ? ?<br/><br/>
? ? ? ? ? ? ? ?<TestInputComponent/>
? ? ? ? ? ?</div>,
? ? ? ? ? ?document.getElementById('container'));
? ?</script>
</body>
</html>

正在回答

2 回答

good

0 回復(fù) 有任何疑惑可以回復(fù)我~

怎么沒看到

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
React入門
  • 參與學(xué)習(xí)       122096    人
  • 解答問題       126    個

顛覆式前端UI開發(fā)框架React入門視頻教程,趕緊學(xué)起來

進(jìn)入課程

imooc-react入門課程代碼--20170424

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號