我有以下形式:獲取表單提交的結果
<form onSubmit={this.gotEmail}>
<div className="form-group">
<FormControl type="text" className="form-control"/>
</div>
<Button className="btn btn-primary btn-large centerButton" type="submit">Send</Button>
</form>
交房時,我想獲得現場寫這裏的用戶:
<FormControl type="text" className="form-control"/>
我試圖得到它像這樣:
gotEmail: function(email) {
console.log("Email: ", JSON.stringify(email))
}
不過,我得到這個錯誤:
EmailForm.jsx:9 Uncaught TypeError: Converting circular structure to JSON
當我嘗試打印在控制檯email
我得到這個:
(program):132 Uncaught illegal access
我怎樣才能得到用戶的輸入?
你使用任何js框架? –
(S)他正在使用React。 – misdreavus79