-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
42 lines (32 loc) · 1.07 KB
/
index.js
File metadata and controls
42 lines (32 loc) · 1.07 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
// var title=document.querySelector('h1')
// title.style.color='red'
// var main= document.querySelector('#main')
// var main =document.getElementById('main')
// console.log(main)
// var para=document.querySelector('.para').innerHTML
// var par=document.querySelector('.para').innerText
// console.log(para)
// console.log(par)
// var element=document.createElement('h1')
// element.innerText='Hello World'
// main.appendChild(element)
// var name=''
// function SayHello(){
// if (name) alert('hello'+ name)
// else alert ('enter a name')
// }
// function getName(){
// var input =document.getElementById('fname')
// name=input.value
// }
// var btnPlus= document.querySelectorAll('.btnplus')
// for (let i=0; i<btnPlus.length;i++ ){
// btnPlus[i].addEventListener('click', function(){
// btnPlus[i].nextElementSibling.innerHTML++
// })
// }
// var btnMinus=document.querySelectorAll('.btnminus')
// btnMinus.addEventListener('click',function(){
// if(btnMinus.previousElementSibling.innerHTML>0)
// btnMinus.previousElementSibling.innerHTML--
// })