Add answer

This commit is contained in:
Bertrand Cournaud 2012-05-22 00:42:27 +02:00
parent 6ba639e01d
commit 8a13dc942a

View File

@ -4,6 +4,20 @@
<meta charset="utf8" />
<link rel="Stylesheet" href="style.css" />
<title>Every Questions</title>
<script laguage="javascript">
function add()
{
var element = document.createElement("input");
element.setAttribute("type", "text");
element.setAttribute("name", "answer");
var foo = document.getElementById("formulaire");
foo.appendChild(element);
}
</script>
</head>
<body>
@ -12,8 +26,32 @@
<h1>Nemubot Questions</h1>
</div>
</header>
<form id="formulaire" method="post" action="questions.php">
<p>
<label for="course">De quelle matière s'agit-il ?</label>
<section name="course" id="course">
<optgroup label="Cours communs">
<option value="SGBD">SGBD</option>
<option value="CompressionDeDonnées">
Compression de données</option>
<option value="TYLA">TYLA</option>
</optgroup>
<optgroup label="TDA">
<option value="RXAN">RXAN</option>
</optgroup>
<optgroup label="MTM">
<option value="ITIL">ITIL</option>
</optgroup>
<optgroup label="Autre">
<option value="Autre" selected>Autre</option>
</optgroup>
</section>
</p>
<p>
<label for="question">Quelle est votre question ? </label>
<textarea id="question" name="question"
@ -23,6 +61,13 @@
<label for="answer">Quelle est la réponse ? </label>
<input id="answer" name="answer" type="text" />
</p>
<p>
<input type="button" value=
"Ajouter une réponse supplémentaire" onclick="add()"/>
<
</p>
<p>
<input type="submit" name="send" value="Envoyer" />
</p>