forked from mukundjha1310/Envoy.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
comdetails.js
38 lines (30 loc) · 980 Bytes
/
comdetails.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
document.querySelector("form"),addEventListener("submit",compdata);
let arr=[];
function compdata(){
let obj={
companyaddress:document.querySelector("#compaddress").value,
companyname:document.querySelector("#compname").value,
compansize:document.querySelector("#select").value
};
if(obj.length===0){
alert("please fill all Company data")
}
else{
arr.push(obj);
console.log(arr);
alert("company data save");
localStorage.setItem("array",JSON.stringify(arr));
window.location.href="loginemail.html";
}
}
function sign(event){
event.preventDefault()
window.location.href="loginemail.html"
}
function signup(event){
event.preventDefault()
arr.push(obj);
console.log(arr)
localStorage.setItem("array",JSON.stringify(arr));
window.location.href="index.html";
}