Questions tagged as 'javascript'

2
answers

Subtract date with javascript

I have the following problem, I have a date that comes from the database and compare with the current date, and I do the following: var dataAtual = new Date(); var partesData = dataAtual.split("/"); var dataAtualNova = new Date(partesData[2],...
asked by 01.12.2016 / 19:11
2
answers

How to construct this regular expression?

I'm trying to build a regular expression and it's a bit difficult. I would like you to help me, and if possible explain how the computer works in relation to this expression I am asking. I need to get everything at the beginning of a Strin...
asked by 30.12.2016 / 22:59
3
answers

Get content inside multiple divs

You need to grab the contents of several div's with equal classes. For example: <div class='conteudo'> <li>Conteúdo 1</li> </div> <div class='conteudo'> <li>Conteúdo 2</li> </div> <div cla...
asked by 04.12.2016 / 19:37
1
answer

click the div increase click again decrease

If you can help me with this question I would like to click on a div that is fixed on the rod and it increases and then click again and it decreases, how do I do that?     
asked by 26.11.2016 / 02:56
1
answer

IF condition in javascript only works once

I'm trying to make a Side Navigation , so on internet search, I found a little tutorial on the site: How TO - Side Navigation However, in my example I wanted a single button to open, and close, so I made the following changes: funct...
asked by 01.12.2016 / 12:47
1
answer

How to generate a json file with the new news to display on my site? [closed]

I would like to generate a JSON file for my site to display the latest news on top for another third party site!     
asked by 02.07.2014 / 22:12
1
answer

Getting the document from an iframe

How do I create a script that returns with an iframe document. I tried this code but it did not work: function getDocumento(ifrane){ return iframe.document; }     
asked by 23.08.2014 / 23:54
2
answers

How do I find the right source of an event in a complex object via JavaScript?

If I create a button ... <button id="btn" value="fui eu">Clique Aqui</button> the event ... document.getElementById("btn").onclick = function(e){ console.log("Quem clicou "+e.target.value) }; It works cool! But if I inse...
asked by 01.07.2016 / 04:38
3
answers

AngularJS does not work correctly

Hello, I'm following a course of the codeschool on Angular and all the examples that I make with the angular do not work, they are very simple thing. I'm going to post the code for someone to tell me what I'm doing wrong. // app.js (fun...
asked by 19.06.2016 / 21:23
2
answers

Search value in input javascript

Opa, I think it should be simple, but I did not get a perfect run. I have a function that when clicked should check the value contained in an input text, the values are separated by a / and are integers. I need to remove it, if it i...
asked by 16.07.2016 / 15:30