generated from jobtrek/ex-js-empty
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinputs.js
25 lines (23 loc) · 876 Bytes
/
inputs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* You should trigger an alert when the user hits enter after entering text on the
* input with id "write-some-text". The text on the alert should be the text typed in the input.
* If input his empty, you should not trigger the alert
*/
export function displayInputContentInAlertOnEnterKey() {
// Write your code here
}
/**
* On the page, you have an HTML input with the id "list-input".
* The user can write text into it, and when he presses enter or blur the field,
* the text should be added to a list of elements with id "list".
*/
export function addElementsInListOnEnterKey() {
// Write your code here
}
/**
* Add functionalities to the list. Now, when you click on one of the li, the element should be removed.
* Use the same list as the previous exercise. "#list"
*/
export function removeElementsFromListWhenClicked() {
// Write your code here
}