var id = []; //crio o array 'id'
id[1] = 2; //atribuo o valor de ao primeiro array
id[2] = 3; //atribuo o valor de ao segundo array
var resposta = []; //crio o array 'resposta'
resposta[1] = 'NAO'; //atribuo o valor de ao primeiro array
resposta[2] = 'SIM'; //atribuo o valor de ao segundo array
var link = []; //crio o array 'link'
link[1] = '#'; //atribuo o valor de ao primeiro array
link[2] = '#'; //atribuo o valor de ao segundo array
var pt_1 = []; //crio o array
var pt_2 = []; //crio o array
var pt_3 = []; //crio o array
var pt_4 = []; //crio o array
var pt_5 = []; //crio o array
var pt_6 = []; //crio o array
var html = []; //crio o array
for(i = 1;i <= 3; i++){ //aqui , eu crio os botoes que terao as opções de escolha do usuario
pt_1[i] = '<div class="col-md-4 col-md-offset-1" id="id_botao_'+i+'">';
pt_2[i] = '<div class="dashboard-stat red-thunderbird" id="local_resposta">';
pt_3[i] = '<a href="'+link[i]+'" id="link_'+i+'">';
pt_4[i] = '<button type="button" class="botao color'+i+'" id="btn_resposta_'+i+'" value="'+id[i]+'">';
pt_5[i] = '<span id="texto_botao">'+resposta[i]+'</span>';
pt_6[i] = '</button> </a> </div> </div>';
html[i] = pt_1[i] + pt_2[i] + pt_3[i] + pt_4[i] + pt_5[i] + pt_6[i];
document.getElementById("div_botoes_"+i).innerHTML = html[i];
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.