Questions tagged as 'javascript'

6
answers

How do I get the current date and add "n" minutes to this value?

I can get the current date simply with new Date() , but how do I add a few minutes to this value? If there is a way to add milliseconds, it can be too.     
asked by 29.01.2014 / 17:00
6
answers

How to select all "empty"

Is there any way to select all the empty elements of a page? For some reason that I can not explain, the code below does not select inputs without text on my page: $("input[value=''], select[value=''], textarea[value='']"); I know I can...
asked by 25.02.2014 / 19:29
2
answers

Send sms from a mobile device via HTML5 / javascript

I am creating a mobile WEB application that will be downloaded in one of the store's, with an integrated mini WEB server that works on any operating system (iOS, android, windows8, etc). In order for the application to be as independent as po...
asked by 09.04.2014 / 19:28
2
answers

How to traverse string and replace ** with b / b

Lately I have used some systems that have the following function, when writing a text between ** it turns this text in bold for example: July * henrique * dos Santos Expected result will be: Julio henrique dos Santos I thoug...
asked by 01.11.2018 / 21:14
2
answers

ES6 classes do not allow declaration of properties?

I was experimenting with the class declaration syntax of ES6 / ES- 2015, and could not declare properties, only methods: class Teste { constructor() { } metodo() { } // não funciona: //propriedade: valor } Is...
asked by 04.01.2017 / 17:22
1
answer

What is the '...' operator in Javascript?

I've seen some uses of ... but I'm not sure what it's like. Example: var a = [1, 2, 3]; var b = [4, 5, ...a]; How do you call this operator and how does it work?     
asked by 03.01.2018 / 14:30
2
answers

Everything I do with JQuery I can do with JavaScript?

I have a serious problem that is: I'm learning jQuery before JavaScript, and I think now I'm going to get it wrong, put my sites on jQuery only, and I'm realizing it's a bad practice. But returning the question: Everything I do with jQuery I...
asked by 05.06.2017 / 13:32
1
answer

How to mark boldly sequentially triplicate and quadruplicate characters in a string?

I want to mark the triplicate and quadruplicate sequences of a string like this: $string = "AAACDEAAAABBBUUDD"; And I would like to get the following result: <b>AAA</b>CDE<b>AAAA</b><b>BBB</b>UUDD   ...
asked by 22.05.2017 / 19:03
1
answer

Why does the RegEx result have two values?

I need kb, mb or gb patterns, I'm using the regular expression (k|m|g)b$ and it has to be at the end of the line. test my expression results in only 1 match when testing "20kb", but in this script the array has 2 positions. Why doe...
asked by 24.04.2015 / 20:35
3
answers

Parameter passing C #

I have the following code in js function consultaSolicitacao() { id = getVar("id"); serviceURL = "/Solicitacao/ConsultaSolicitacao"; $.get(serviceURL, null, function (data) { var aux = data.length; var tblText = ''; for...
asked by 13.05.2015 / 21:03