Questions tagged as 'javascript'

1
answer

Change color pie chart php

Good afternoon! I'm creating a pie chart, the data I'm looking for from the database. But I do not know how to change the colors of the sectors of the pie chart, to make it clear I will show here what I want. Home The code is as follows:...
asked by 19.06.2018 / 14:18
1
answer

Totalize column values of an HTML table, with decimal result

I need to display the total result by adding the values that contain the value column: var linha=document.getElementsByClassName("calcular"); var resultado=document.getElementById('total').innerHTML = 0;...
asked by 02.06.2018 / 19:27
2
answers

Limit value R $ in input field with HTML5 and CSS3 with Javascript

I need to limit the R $ value of the input field of a form. The form looks like this: <div class="container"> <form> <div class="form-group"> <label for="dinheiro"><b&g...
asked by 15.06.2018 / 19:25
1
answer

Doubts with anchor link

I created a script as follows: <script> $(function() { $('#mostrar_planos').bind('click',function(event){ var $anchor = $(this); $('html, body').stop().animate({scrollTop: $($anchor.attr('href')).offset().top}, 500,'swing');...
asked by 07.06.2018 / 15:48
2
answers

How can I extract values from a Javascript input, but using HTML validation

<form><label for="NUMERO">Digite um número</label> <input type="number" name="num" id="NUMERO" min="0" max="100"> <button type="submit">Enviar</button> </form> I would like javascript to have the n...
asked by 17.06.2018 / 02:50
1
answer

Return JSON saved in localStorage

I'm trying to retrieve a JSON that I've saved in localStorage, in the salvarOffline() function. With code like the listarHorarios() function I get a undefined and the loop repetition does not work. My code: function salvar...
asked by 24.03.2018 / 06:20
2
answers

Slides, transition of images with JS and radius, when hitting the mouse on top of the image pause the transition, while withdrawing continue the transition

onload = start; function start(){ var i = 1; function Move(){ i = (i%3)+1; // 4 is the Number of image in slider document.getElementById('t'+i).checked = true; } setInterval(Move,3000); //change img in 3 sec } body{ backgro...
asked by 02.06.2018 / 04:03
1
answer

How to manipulate a span element using pure JS

My question in this exercise is how to keep my total points fixed, because whenever the function is executed the value changes and it automatically returns to the value 100. So how should I manipulate this span? Or was my approach very wrong in...
asked by 27.03.2018 / 19:56
2
answers

Error calling function on my page

I'm having trouble calling two functions to validate the txtnome and txtsobrenome fields, calling the functions validanome() and validasobrenome() . I tried calling them as follows: if (!validanome(cad.txtnome.val...
asked by 20.05.2018 / 03:10
1
answer

How to trigger the scroll using pure javascript?

I would like to know how to implement in pure javascript the same action used with jQuery below: $('html, body').animate({ scrollTop: 500 }, 300); Can anyone tell me what the code looks like?     
asked by 29.05.2018 / 16:22