首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >获取ReactJS格式的表单数据

获取ReactJS格式的表单数据
EN

Stack Overflow用户
提问于 2014-05-02 19:45:06
回答 20查看 416.4K关注 0票数 280

我的render函数中有一个简单的表单,如下所示:

render : function() {
      return (
        <form>
          <input type="text" name="email" placeholder="Email" />
          <input type="password" name="password" placeholder="Password" />
          <button type="button" onClick={this.handleLogin}>Login</button>
        </form>
      );
    },
handleLogin: function() {
   //How to access email and password here ?
}

要访问EmailPassword字段,我应该在handleLogin: function() { ... }中写入什么?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23427384

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档