Questions tagged as 'javascript'

3
answers

(pure Js) function that filters array so that it returns unique arrays with distinct elements

var list =[ [3,4,7,9,4],[3,4,7,9,5],[3,4,7,9,6],[3,4,7,9,7], [3,4,7,9,8],[3,4,7,9,9],[3,4,8,3,3],[3,4,8,3,4], [3,4,8,3,5],[3,4,8,3,6],[3,4,8,3,7],[3,4,8,3,8], [3,4,8,3,9],[3,6,4,6,7],[3,6,4,6,8],[3,6,4,6,9], [3,6,4,7,3],[3,6,4,7,4],[3,6,4,7,5],[3...
asked by 02.05.2018 / 21:02
1
answer

Place background image on HTML canvas

I'm trying to learn a little more about canvas for games in Html5. var canvas;//o elemento canvas sobre o qual desenharemos var ctx;//o "contexto" da canvas que será utilizado (2D ou 3D) var dx = 5;//a tava de variação (velocidade) horiz...
asked by 01.05.2018 / 23:30
1
answer

Dynamic form javascript

I have a project in which the form has to be dynamic, for example when filling name and age appears other fields like address and so on, I would like some hint how to do this with javascript / jquery. <div id="main"> <form action=...
asked by 01.05.2018 / 01:40
2
answers

___ ___ erkimt JavaScript method ___ ______ ___ azszpr294989

You need to set %code% as an object. So you can build %code% % %code% method as a% function:

%pre%
    
______ ___ azszpr294988

If I create a variable %code% %% %code% is not a function? how I define this method with the function did, in %code% ? if a code as an example, would be very helpful ..

%pre%
    
___

___ ___ erkimt JavaScript method ___ ______ ___ azszpr294989 You need to set %code% as an object. So you can build %code% % %code% method as a% function: function fiz(){ alert('Eu fiz, o que não fiz!'); } eu.pensamento = fiz...
asked by 29.04.2018 / 22:16
1
answer

Execute 3 tasks with setInterval

I have 3 querys and I need every time the setInterval triggers it to execute a query at the end, go back to the first one. setInterval(function () { var query1 = "select * from weather.forecast where woeid = '429100' and u = 'c'"; var quer...
asked by 01.05.2018 / 07:58
1
answer

Is there a way to customize the function alert equal to the input required?

My question is somewhat specific, but I would like to know if there is a possibility of creating a message of alert with the default of the input required ? The situation is this: I have a linked div that will forward to another...
asked by 30.04.2018 / 16:21
1
answer

How do I get a list of JS objects in Controller C # MVC?

I have an object with a list that will return me 3 or more items. I pass this object like this: var jsonObjs = JSON.stringify(arrayObj); alert(jsonObjs); CarregaNotas(jsonObjs); functionCarregaNotas(notas){jQuery.ajax({type...
asked by 30.04.2018 / 14:40
1
answer

Dynamic background with CSS? How to make?

I have a question, is it possible to change background according to a condition? Example: function A() { if (meuArray.length === 7) { eu quero background verde } else { background azul } } At first I'm doing...
asked by 07.06.2018 / 04:59
1
answer

Clip Property

I'm using the clip property in a tag to make a cut in the bottom of it, however this image will be dynamic, the size of the width is fixed but the size of the height will be dynamic. So if I have an image with height: 1000px; an...
asked by 06.06.2018 / 20:38
2
answers

How to clone Divs from a past number of Select?

I need to create a select with values from 1 to N numbers. After the user selects a number in the select I have to clone the lote div from the selected value. Example: if I select the number 2 in the select, you have to clone two divs....
asked by 07.06.2018 / 15:38