React Exercise 7: Click div, display innerHTML

Requirements: Click div, display innerHTML

strong> prevent </ strong>, <strong> thorough investigation </ strong>, <strong> and severe </ strong>. </ div> ;
            




    <div onClick = {(e) => alert (e.target.innerHTML)}> <strong> Ningxia focus on the four settle the problem milk powder thorough investigation work </ strong>, the source of the region's farming, milk acquisitions and dairy production, management, catering and other aspects of 27,000 units a comprehensive inventory problem milk powder cases were investigated four cases, involving three companies, revoked two milk powder production enterprises production license. </ div> ;
             <div onClick = {(E) => Alert (e.target.innerHTML)}> proper risk monitoring is one of the priorities to strengthen food security in many places. In Beijing, <strong style = {{color : 'red'}}> The city set up a 3000 risk monitoring points </ strong>, including the establishment of more than 3,000 kinds of food additives and illegal additives database of 110 domestic and foreign food-related organizations, media clues monitoring, timely risk assessment, to strengthen the sampling control. </ div> ;
         </ div>
     ); 
} 

ReactDOM.render (
     <Showinnerhtml />, 
    document.getElementById ( 'the root' ) 
)

 

Guess you like

Origin www.cnblogs.com/sx00xs/p/11828523.html