课程: Learning Full-Stack JavaScript Development: MongoDB, Node, and React
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Reading form data with the DOM API
课程: Learning Full-Stack JavaScript Development: MongoDB, Node, and React
Reading form data with the DOM API
- [Instructor] The next step would be to propose a new name and this is going to be our first update operation, and it has multiple elements to it. The first task would be to create a form so that the user can submit the name, that's straightforward, it's just HTML so I'm going to add it here somewhere. Another title DIV, this time let's label it propose a new name, and in a body DIV, we need a form element, we don't need an action, this action is to submit the form regularly, not with JavaScript and within the form, we need an input text. To identify that input we can use either the name or the ID. I'm going to use the name to show you how to deal with that through the DOM API, let's name it new name and we can also add a placeholder here with a text like new name here. The other thing that we need for the form is a submit button so we'll do a button, submit, with a label, submit. Let's take a look at that form, and…
内容
-
-
-
-
-
-
-
(已锁定)
Handling data in an array3 分钟 27 秒
-
(已锁定)
Reading form data with the DOM API6 分钟 49 秒
-
(已锁定)
Understanding HTTP request methods2 分钟 19 秒
-
(已锁定)
Using an API endpoint to update data9 分钟 48 秒
-
(已锁定)
Updating UI based on API response1 分钟
-
(已锁定)
Project challenge2 分钟 1 秒
-
(已锁定)
Next steps1 分钟 27 秒
-
(已锁定)