Add script.js which work with header.html :p
This commit is contained in:
parent
f2a4098897
commit
b0eeaa1be2
23
script.js
Normal file
23
script.js
Normal file
@ -0,0 +1,23 @@
|
||||
function add()
|
||||
{
|
||||
var element = document.createElement("input");
|
||||
|
||||
element.setAttribute("type", "text");
|
||||
element.setAttribute("id", "answer");
|
||||
element.setAttribute("name", "answer" + nbAnswer);
|
||||
nbAnswer++;
|
||||
element.setAttribute("placeholder", "Nouvelle réponse");
|
||||
|
||||
var foo = document.getElementById("answerList");
|
||||
foo.appendChild(element);
|
||||
}
|
||||
|
||||
function hideShow(which)
|
||||
{
|
||||
if (!document.getElementById)
|
||||
return
|
||||
if (which.style.display == "block")
|
||||
which.style.display = "none"
|
||||
else
|
||||
which.style.display = "block"
|
||||
}
|
Reference in New Issue
Block a user