Questions tagged as 'javascript'

4
answers

filter object by array javascript

I have the following object: alunos : { nome: 'teste', idade: '15', turma: 'turma 1'}, { nome: 'teste2', idade: '16', turma: 'turma 2'}, { nome: 'teste3', idade: '12',...
asked by 07.12.2017 / 12:32
4
answers

Calculate inputs with JavaScript

I need to make + index work because it is a system for generating pages with embedded products. In this case, each inserted product will have a total0 + total1 and so on. However, it has to be in real time the value! function Soma...
asked by 08.12.2017 / 16:23
1
answer

Create component to be used via npm

I started working a lot with vue and started using it on all the projects in the company where I work. And with that, I ended up creating some componentes , in general autocomplete , I know that there are many, I have already...
asked by 11.12.2017 / 14:35
2
answers

How to pass two arguments in the JavaScript onclick function by programming in PHP?

I have a button that I generate with AJAX and on that same button it has an event onclick , and I want to pass two arguments to it, however I am having bugs with it. PHP code: echo ' <button type="button" class="btn btn-link btn-...
asked by 22.11.2017 / 21:22
2
answers

Why is my arithmetic mean wrong?

var n1 = prompt("Nota 1: "); alert(n1); var n2 = prompt("Nota 2: "); alert(n2); var media = (n1+n2)/2; if(media >= 6){ alert("Aprovado!\n\nMédia: " + media); }else{ alert("Reprovado!\n\nMédia: " + media); } When done by console.lo...
asked by 04.01.2018 / 01:12
3
answers

Help with Asset (Laravel Blade)

Alright? I'm working on a project with the Laravel framework. In my project I can call a js file, but it does not work. <script src="{{asset('js/formCurriculo.js')}}" type="text/javascript" async="true" defer></script> Whil...
asked by 10.01.2018 / 19:46
3
answers

How to change the radio button background when it is selected

I have the following problem, I have on my form several issues that are handled using the radio button, as print attached. I'm using jquery to change the color of the button when it's selected, the problem is that when the person selects the typ...
asked by 08.01.2018 / 15:50
3
answers

Customize the alert

I need help with alert() of js , in which I'm returning some values just information for the user. Today I'm only returning alert() , however I've been searching and found some alternatives (modal, bootbox, etc ...), but I...
asked by 09.01.2018 / 16:13
2
answers

Catching Field in Hidden Div

How to disable a field that is inside a hidden div so it does not work on submitting the form Exemp: In this script, when I submit the form, the fields that are hidden are sent, but this field should only be sent when they are shown How to...
asked by 01.08.2017 / 19:55
1
answer

What's wrong with my code?

var quantidade = "200"; setInterval(function(){ var tempo = document.getElementById("banner").textContent; var match = tempo.match(/[^\d](\d+)/); var nr = match && match[1]; if(nr === "5"){ var red...
asked by 24.07.2017 / 12:57