18910140161

向状态反应发送隐藏输入的值

顺晟科技

2021-08-12 11:36:33

57

我有以下内容:

 const { siteLocation, Services, date, cnum } = this.state;

  const selections = {
    siteLocation,
    Services,
    date,
    cnum,
  };

和以下内容:

 <p className="Services">
    <input name="Services" type="text" className="validate[required,custom[email]] feedback-input" id="Services" placeholder="Services" onChange={this.handleInputChange} />
 </p>
            
    <input type="hidden" name="date" value={Date().toLocaleString()} onChange={this.handleInputChange} />
                

但是,一个工作的服务在更改时将其设置为状态,但是具有隐藏类型和date名称的服务不会更改。如何将隐藏标记的值发送到状态中?


顺晟科技:

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航