File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
6-data-storage/02-localstorage
1-form-autosave/solution.view Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11<!doctype html>
2- < textarea style ="width:200px; height: 60px; " id ="area " placeholder ="Write here "> </ textarea >
2+ < textarea style ="width:200px; height: 60px; " id ="area " placeholder ="Напишите сообщение здесь "> </ textarea >
33< br >
4- < button onclick ="localStorage.removeItem('area');area.value='' "> Clear </ button >
4+ < button onclick ="localStorage.removeItem('area');area.value='' "> Очистить </ button >
55< script >
66 area . value = localStorage . getItem ( 'area' ) ;
77 area . oninput = ( ) => {
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ alert( sessionStorage.getItem('test') ); // после обновления: 1
177177
178178... Но если вы откроете ту же страницу в другой вкладке и повторите получить данные снова, то код выше вернет ` null` , что значит " ничего не найдено" .
179179
180- Так получилось, потому что ` sessionStorage` привязан не только к источнику, а к вкладке браузера. Поэтому ` sessionStorage` используется нечасто.
180+ Так получилось, потому что ` sessionStorage` привязан не только к источнику, но и к вкладке браузера. Поэтому ` sessionStorage` используется нечасто.
181181
182182## Событие ` storage`
183183
You can’t perform that action at this time.
0 commit comments