Fix simples errors in the two classes
JavaScript now generates inputs with a unique name Add todo in questions.php and manage multiple answers; start using Question class
This commit is contained in:
parent
91d2b8471c
commit
48a77a0d10
4 changed files with 76 additions and 35 deletions
|
|
@ -6,12 +6,14 @@
|
|||
<title>Every Questions</title>
|
||||
|
||||
<script laguage="javascript">
|
||||
var nbAnswer = 1;
|
||||
function add()
|
||||
{
|
||||
var element = document.createElement("input");
|
||||
|
||||
element.setAttribute("type", "text");
|
||||
element.setAttribute("name", "answer");
|
||||
element.setAttribute("name", "answer" + nbAnswer);
|
||||
nbAnswer++;
|
||||
element.setAttribute("placeholder", "Enter the new answer");
|
||||
|
||||
var foo = document.getElementById("answerList");
|
||||
|
|
@ -106,7 +108,7 @@
|
|||
</p>
|
||||
<p id="answerList">
|
||||
<label for="answer">Quelle est la réponse ? </label>
|
||||
<input id="answer" name="answer" type="text" />
|
||||
<input id="answer" name="answer0" type="text" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
Reference in a new issue