-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
62 lines (61 loc) · 1.49 KB
/
app.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
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
let textarea = document.getElementById('taxtarea')
function cleara() {
textarea.innerHTML = "";
}
function fony_sise(size){
let fontsiza = size.value
textarea.style.fontSize =fontsiza + "px";
}
function colorch(change){
let color = change.value;
textarea.style.color=color;
}
function btnbold() {
if (textarea.style.fontWeight == "bold") {
textarea.style.fontWeight = "normal"
}
else {
textarea.style.fontWeight = "bold"
}
}
function btnitalic() {
if (textarea.style.fontStyle == "italic") {
textarea.style.fontStyle = "normal"
}
else {
textarea.style.fontStyle = "italic"
}
}
function btnunderline() {
if (textarea.style.textDecoration == "underline") {
textarea.style.textDecoration = "none"
}
else {
textarea.style.textDecoration = "underline"
}
}
function btnaA() {
if (textarea.style.textTransform == "uppercase") {
textarea.style.textTransform = "none"
}
else {
textarea.style.textTransform = "uppercase"
}
}
function left(){
textarea.style.textAlign = "left"
}
function center(){
textarea.style.textAlign = "center"
}
function right(){
textarea.style.textAlign = "right"
}
let fontFamily = document.getElementById('font_Family')
fontFamily.addEventListener("input",function(){
textarea.style.fontFamily=fontFamily.value
})
// function Clearall(){
// document.getElementById('new-div').innerHTML="";
// }
// console.log(Clearall())