-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
43 lines (30 loc) · 834 Bytes
/
index.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
var sites = [];
var id = 0;
// main function
function main(name) {
sites.name = name;
}
// ajouter un nom
function nom() {
var ul = document.getElementById("site-list");
var a = document.createElement("a");
var Nom = document.getElementById("NAME").value;
console.log(Nom)
a.appendChild(document.createTextNode("Element 4"));
}
function function1() {
var ul = document.getElementById("list");
var li = document.createElement("li");
li.appendChild(document.createTextNode("Element 4"));
}
// ajouter un lien
function url() {
var input = document.getElementById("URL").value;
console.log(input)
var anchor = document.getElementById("siteone");
var att = document.createAttribute("href");
att.value = input;
anchor.setAttributeNode(att);
}
function function1() {
}