React Exercise 6: Remember the password prompt box

Requirements: message box is displayed when the mouse mouseoverj, mouseoutj hide

import React,{useState,useEffect} from 'react';
import ReactDOM from 'react-dom';
import './index.css';


function Tips(props){
    const [isShow,setShow]=useState(false);
    return(
        <div id="outer">
            <label            
            onMouseOver={()=>setShow(true)}
            onMouseOut = {() => setShow ( to false )}
             > <INPUT type = "CheckBox" /> within two weeks automatic landing </ label>
            <Div id = "tips" className = {isShow 'new':? ''}> For your information, please do not use this feature on Internet cafes or public computer! </ Div>
        </div>
    )
}



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

 

Guess you like

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