File tree Expand file tree Collapse file tree 5 files changed +6
-5
lines changed
Expand file tree Collapse file tree 5 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 5151 </ div >
5252 < p > Upload image < input type ="file " name ="wishImage " onchange ="uploadFile() "> </ p >
5353 < p >
54- < button name ="submit " onclick ="validateForm(event ) ">
54+ < button name ="submit " onclick ="validateForm() ">
5555 Send your letter
5656 </ button >
5757 </ p >
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ Level 2 - Local storage
182182 ` localstorage.length ` .
183183 The loop must do few things:
184184 - create an element ` li ` .
185- - get the data from localstorage for that ` userKey ` and append it to ` li ` .
185+ - get the data from local storage for that ` userKey ` and append it to ` li ` .
186186 e.g: ` li.appendChild(document.createTextNode(data.giftDescription)); `
187187 - this ` li ` element must be appended to the ` ul ` element
188188 e.g: ` ul.appendChild(li); `
@@ -191,6 +191,7 @@ Level 2 - Local storage
191191
192192 We have a function, that would display the list of wishes, but when do we
193193 call this function?
194+
194195 As soon as the ` wish-list.html ` loads, we need all the elements to be
195196 displayed. So we call the function ` displayWishes() ` when the DOM is loading
196197 i.e on the ` onload ` event.
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ Math.random
101101 the index value would be 1 count extra, so we need to use the limit as
102102 ` localStorageIndex-1 `
103103 2 . This random number can be used to get the gift description at that location
104- (use the key as ` user+ 'randonmNo' ` ) in local storage.
104+ (use the key as ` user + 'randonmNo' ` ) in local storage.
105105 3 . Display the ` gift.description ` name in DOM by using the query selector
106106 ` .santa-gift-text ` .
107107
Original file line number Diff line number Diff line change 77 < link rel ="stylesheet " href ="css/result.css ">
88</ head >
99
10- < body onload =" fillContent() " >
10+ < body >
1111
1212 < header >
1313 < ul >
Original file line number Diff line number Diff line change 77 < link rel ="stylesheet " href ="css/wishlist.css ">
88</ head >
99
10- < body onload =" displayWishes() " >
10+ < body >
1111
1212 < header >
1313 < ul >
You can’t perform that action at this time.
0 commit comments