Questions tagged as 'javascript'

2
answers

How to make a span display the value of a range as it moves it with the mouse? [duplicate]

The function is working, however I want to update the value in <span> as I move with the mouse. Can anyone help? function mostrarPorcentagem(novoValor) { document.getElementById("exibePercent").innerHTML = novoValor; }...
asked by 13.01.2017 / 16:44
1
answer

Can you hide the redirect, but keep the link for download?

I made a simple favlet to make it easy to convert videos from YouTube for audio: <a href="javascript:!function(){window.location.href='http://www.youtubeto.com?task=MP3&url='+window.location.href;}();">youtubeto : mp3</a>...
asked by 09.01.2017 / 18:44
1
answer

Input [number] accept only numbers in Firefox

How do I make the input [number] field accept only numbers in Firefox? In Chrome, Opera and Edge works perfectly, but in Firefox the [number] field accepts letters and spaces. <inputtype="number" name="EstoqueProd[]" class="form-control"...
asked by 01.11.2017 / 15:27
3
answers

Convert JSON to EXCEL

I have a ajax query that returns a Json with an array of objects, how can I turn this json into excel? My json example: [ {idcancelamento: "383", idcliente: "2409", emailcancelamento: "1", financeiro: "1", suporte: "1"}, {idcancela...
asked by 23.10.2017 / 19:19
2
answers

How to sum all the elements of an ng-repeat? [duplicate]

Example: I have a ng-repeat any, which repeats each a number. How do I store a variable that is equal to the sum of this number of each repeat? Angular CodeJS: ngular.module('meumodulo', []) .controller('mercadoria', function($root...
asked by 27.09.2017 / 13:44
1
answer

JavaScript function to add days, is adding up a month ahead

I'm with this JavaScript function that is adding the days to a date, the days it adds up right, only instead of adding it to 10/24/2017 + 2 days = 10/26/2017 , he plays a month ahead, so stay that way 24/10/2017 + 2 days = 26/11/2017. Here's...
asked by 24.10.2017 / 18:27
1
answer

How to change font properties in javascript

I need to change the font format and play over the icon as picture. Text is being displayed by: label: beach [7] for (var i = 0; i < locations.length; i++) { var beach = locations[i]; var myLatLng = new google.maps.LatLng(beach[5]...
asked by 01.09.2017 / 03:26
1
answer

How to search for a character in a set of javascript strings

I have a set with certain strings, it's a vector, I need to do character searches in this set. Case: Be V my set of strings contemplated by: ["ana", "paula", "cris", "voa", "karmanguia"]; Be P my search, I want to c...
asked by 15.09.2017 / 15:12
1
answer

How to update a DIV with Ajax / JS? [duplicate]

I'm developing a page, however I'm completely lay in the matter of JS ... The site has the div with the ID #content, and inside it a refresh button. How can I do when someone clicks it to refresh only the div, not the entire page? I'm cu...
asked by 20.09.2016 / 12:56
2
answers

Clone select jquery / javascript

I'm a beginner, and I'm having trouble running this code I used from another topic from here ( Add and Remove fields with Javascript ). Here he did not run, but in my localhost he even clones the requested snippet but does not just show sele...
asked by 21.09.2017 / 22:11