Tie an event to all indents - for losing focus, each input displays its value in a paragraph with id = "test".
Closed due to the fact that off-topic participants teran , Regent , Sergey Glazirin , Jarvis_J , Kromster 26 Jun '18 at 12:29 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- " Learning tasks are allowed as questions only on the condition that you tried to solve them yourself before asking a question . Please edit the question and indicate what caused you difficulties in solving the problem. For example, give the code you wrote, trying to solve the problem "- teran, Regent, Sergey Glazirin, Jarvis_J, Kromster
- 2What are the difficulties with the task? - Grundy
|
1 answer
Select all elements of input, you can use the selector on the tag
You can add a focus loss event handler to jQuery using the blur method.
Inside the handler, this will point to the input itself, and its value can be obtained using the .value property
To display the value in the paragraph with the desired id , you must first select this paragraph using the selector on id
Then set the text to it using the .text method
|