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 44 45 46 47 48
|
function choix_reponse1(choix)
{
if(choix==1)
{
var d=document.getElementById("suiteform");
d.innerHTML="<input type='radio' value=';coment' name='typerep'/>commentaire une ligne <br/> <input type='radio' value=';ligne' name='typerep'/>commentaire sur plusieurs ligne ";
}
if(choix==2)
{
var d=document.getElementById("suiteform");
d.innerHTML="min<input type='text' size='3' name='min'/> max<input type='text' size='3'name='max'/>" ;
}
if(choix==3)
{
var d=document.getElementById("suiteform");
d.innerHTML="<input type='radio' value=';box' name='typerep' onclick='choix_reponse2()'/>Bouton checkbox <br/> <input type='radio' value=';radio' name='typerep' onclick='choix_reponse2()'/>bouton radio";
}
}
function choix_reponse2()
{
var c=document.getElementById("suiteform2");
c.innerHTML="<input type='text' size='2' name='nbReponse' /><input type='submit' value='ok' onclick='nbreReponse(nbReponse)'/>";
}
function nbreReponse(nbre)
{
for(i=0;i<nbre.value;i++)
{
var d=document.getElementById("suiteform3");
var newInput=document.createElement('input');
newInput.type='text';
newInput.size=10;
newInput.name='valReponse';
d.appendChild(newInput)
}
var newSubmit=document.createElement('input');
newSubmit.type='submit';
newSubmit.value='ok';
d.appendChild(newSubmit)
} |