-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
30 lines (22 loc) · 999 Bytes
/
main.js
File metadata and controls
30 lines (22 loc) · 999 Bytes
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
26
27
28
29
30
//Set
window.localStorage.setItem("color", "red"); //يطلب منك الكي والفاليو
window.localStorage.fontWeight = "bold";
window.localStorage["fontSize"] = "20px";
console.log(window.localStorage); //يجيب لك المخزن وكم عنصر بداخله
console.log(typeof window.localStorage); //نوعه object
//Get
console.log(window.localStorage.getItem("color"));
console.log(window.localStorage.color);
console.log(window.localStorage["color"]);
//Set Color In Page
document.body.style.backgroundColor = window.localStorage.color; //باك قراوند لتغيير لون الصفحه
//كولور لتغيير لون الخط
//كولور لتغيير لون الخط
// //Remove One
// window.localStorage.removeItem("color");
// //Remove All Keys
// window.localStorage.clear();
//Get Keys
console.log(window.localStorage.key(0)); //تعطيه الاندكس حق الكيي الي تبغاه
//to get storge in application:
//in the browser you go to application