Questions tagged as 'javascript'

2
answers

How do I get the commas and insert spaces between the numbers in this array?

I made this array but I can not get the commas out and replace them with two or three spaces. Does anyone have an idea to help me please? <div id="demo1" name="demo1" style="margin-left: 100px; margin-top:25px;color:red; font-size:16px; fon...
asked by 03.01.2019 / 11:56
1
answer

If inside the loop does not work correctly

Good evening. I have the following function: function verificaOnOff(){ for(var i in tbModulos){ var mod = tbModulos[i]; $.get('http://'+ mod.ip +'/rele', function(data) { if (data == '1') { $('#icone-'+i).removeC...
asked by 30.06.2018 / 01:17
2
answers

Problem solution error [closed]

   Read 2 integer values and store them in variables A and B.   sum of A and B by assigning its result to variable X. Print X   as shown below. Do not present any messages   in addition to what is being specified, and be sure to print the   end...
asked by 12.07.2018 / 17:16
1
answer

Test value javascript

I'm trying to return true or false {{ !form.tel_numero.length >= 9 }} Not working If I do not use denial it works {{ form.tel_numero.length >= 9 }} But, I need denial     
asked by 21.07.2018 / 14:54
2
answers

Attributes in Functions - JavaScript

I was noticing that $ of jQuery is a function, but if I do $. I can access several other functions, which are attributes of the $ function. How can a function have attributes that are accessible out of context through ....
asked by 11.07.2018 / 00:20
3
answers

String Jquery or JS

Example: var question1="What is nuclear physics"; var question2="What is nuclear physics" In case I would like to always pick up what is after what is or what it means. Thanks,     
asked by 14.07.2018 / 17:17
2
answers

Add json object property

I have a json object and need to multiply the value vlr_produto with the function add() data={ id: 6, nome_produto: "Produto", vlr_produto: 16.98, qtd: 0 } add(data) { var mult = data.qtd++; mult * data.vl...
asked by 02.08.2018 / 12:35
2
answers

How to check if the url is true

I made this simple code to encode urls, but I would like it to work only with url checking if the protocol and hostname are correct or if the magnetic link is correct: http://www.exemplo.com/ https://www.exemplo.com/ http://exemplo.com/ https:...
asked by 26.07.2018 / 03:40
2
answers

How do I configure an SSL certificate for an application that runs in Express?

How to set up an SSL certificate for an application that runs in Express? I'm trying to configure the Express server I created, to pass the SSL certificate and go from http to https. I have read the Express documentation, but I can not fin...
asked by 25.07.2018 / 17:34
1
answer

turn string into javascript array

Good afternoon, I have the following string [{"programa":"teste"},{"programa":"Aprender"},{"programa":"outro teste","indice":"0;1;0"}][{"programa":"Programando 1","indice":"1;2;3"},{"programa":"hostórico","indice":"1;2;2"},{"programa":"anál...
asked by 23.07.2018 / 20:01