-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPower_Calculator.html
More file actions
129 lines (107 loc) · 3.32 KB
/
Power_Calculator.html
File metadata and controls
129 lines (107 loc) · 3.32 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
padding:0px;
margin: 0px;
box-sizing: border-box;
}
body{
width: 90%;
border: 0.02px ;
margin: 3px auto;
}
.title{
color: white;
background-color: gray;
margin: 0px;
}
.title h2{
margin-left: 10px;
text-shadow: 3px 3px 9px rgb(12, 148, 148);
}
.mainContainer{
}
.inputContainer{
background-color: antiquewhite;
display:block;
width: 100%;
margin: 10px auto;
border-radius: 8px;
}
input, textarea {
margin: 10px 20px;
width: 85%;
}
button{
padding: 8px;
margin: 5px;
margin-left: 20px;
}
.contentContainer{
width: 40%;
margin: 20px;
}
.contentContainer p{
background-color: aqua;
}
</style>
<title>Document</title>
</head>
<body>
<div class="title"><h2>TO DO LIST</h2></div>
<div class="mainContainer">
<div class="inputContainer">
<input id="inputAdd" type="text">
<textarea id="inputArea" name="" id="Content" cols="30" rows="10">
</textarea>
<button id="contAdd" onclick="add()" type="submit">📌 Edit</button>
<button id="contDelet" onclick="deletCont()"> 🧹 Delete </button>
</div>
<div id="todoList">
<div id="contentArea" class="contentContainer">
<h1 id="title"> Hello</h1> <hr>
<p id="text2">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ut dolor quaerat incidunt veniam, voluptatem quis a, distinctio, aperiam harum voluptatum ducimus nostrum ex. Neque sed hic tenetur corporis natus deleniti!</p>
<button id="btnEdit" href="">📝 Edit</button>
<button id="btnDelete" href="">🧼 Delete</button><hr>
</div>
</div>
</div>
<script>
function deletCont(){
}
function add(){
let addTitle = document.getElementById("inputAdd").value;
let addParagraph = document.getElementById("inputArea").value;
let contentArea = document.getElementById("contentArea");
let todo = document.getElementById("todoList");
let btn1 = document.getElementById("btnEdit");
let btn2 = document.getElementById("btnDelete");
let contentHolder = document.createElement("div");
let title = document.createElement("h1");
let parg = document.createElement("p");
let btnEdit = document.createElement("button");
let btnDlt = document.createElement("button");
let rule = document.createElement("hr");
title.textContent=addTitle;
parg.textContent=addParagraph;
btnEdit.textContent="📝 Edit";
btnDlt.textContent="🧹 Delete";
contentHolder.appendChild(title);
contentHolder.appendChild(rule);
contentHolder.appendChild(parg);
contentHolder.appendChild(rule);
contentHolder.appendChild(btnEdit);
contentHolder.appendChild(btnDlt) ;
contentHolder.appendChild(rule);
contentHolder.classList.add("contentContainer")
todo.appendChild(contentHolder)
console.log(rule);
}
</script>
</body>
</html>