react中onClick事件,input输入框获取,重置,返回键

import React, { Component } from 'react';
import { render } from 'react-dom';
import {hashHistory} from 'react-router';
import config from '../../../../assets/common/config';
export default class HandlerSuspend extends Component { 
    componentWillMount() {
              
    }
    componentDidMount() {
        
    }
    render() {
        return (
           


               

                   

                        请输入手机号:
                        this.number = input} name="mobile" id="number" class="text" maxLength="11" placeholder="请输入手机号" />
                   

                   

                        输入服务密码:
                        this.password = input} name="mobile" id="password" class="text" maxLength="6" placeholder="请输入服务密码" />
                   

                   

                       
                       
                   

               

           

        );
    }


    getSuspend(){
        let number = this.number;
        let password = this.password;
        number.value = "";
        password.value = "";
    }
    getSure(){
        console.log("点击了我");   
    }
    back(){
        setTimeout(()=>{
            hashHistory.goBack();
        },500);
    }

}

你可能感兴趣的:(react中onClick事件,input输入框获取,重置,返回键)