vinissh

Untitled

Aug 13th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*document.getElementById('mostrar-opcao').onclick = function(){
  2.     //var compo_select = document.getElementById('options');
  3.     //var indice_selecionado = campo_select.options.selectedIndex;
  4.     //var valor_selecionado = campo_select.options[indice_selecionado].innerHTML;
  5.     //document.getElementById('opcao_selecionada').innerHTML = valor_selecionado;
  6.  
  7.     var valor_selecionado = document.getElementById('options').value;
  8.     document.getElementById('opcao_selecionada').innerHTML = valor_selecionado;
  9. }*/
  10.  
  11.  
  12. // Radio Buttons
  13.  
  14.  
  15. /*document.getElementById("mostrar_radio").onclick = function () {
  16.  
  17.     var radio = document.getElementsByName("genero");
  18.    
  19.     var radio_selected;
  20.    
  21.     for (var a = 0;  a < radio.length; a++) {
  22.         if (radio[a].checked) {
  23.             radio_selected = radio[a].value;
  24.         }
  25.     }
  26.    
  27.     document.getElementById("radio_selecionado").innerHTML = radio_selected;
  28.  
  29. };*/
  30.  
  31. //Chekboxes
  32.  
  33. /*document.getElementById("mostrar_check").onclick = function () {
  34.  
  35.  
  36.     var check = document.getElementsByName("interesse");
  37.  
  38.     document.getElementById("check_selecionado").innerHTML = "";
  39.  
  40.     for (var b = 0;  b < check.length; b++) {
  41.         if (check[b].checked) {
  42.             document.getElementById("check_selecionado").innerHTML += '<li>' + check[b].value + '</li>';
  43.         }
  44.     }
  45.  
  46.  
  47. };*/
  48.  
  49.  
  50. // Dates
  51.  
  52.  
  53.  
  54. document.getElementById("mostrar_data").onclick = function () {
  55.  
  56.     var data_select = document.getElementById("data_evento").value;
  57.     var data_completa = new Date(data_select);
  58.     document.getElementById("data_selecionada").innerHTML = data_completa;
  59.  
  60. };
Advertisement
Add Comment
Please, Sign In to add comment