Questions tagged as 'javascript'

2
answers

Expand / collapse table contents by clicking title

I have a table, I want to load the page with its hidden content, and when I click on the title (in the example below waiting ), load the content and click on the title again the content is collected and hidden. How can I do this? <...
asked by 28.03.2018 / 20:39
1
answer

Separate one paragraph for sentences

I need to break a paragraph in a set of sentences. For example: var paragrafo = "Sou Dr. José. Meu passatempo é assistir séries. Adoro animais!! E você?"; var frases = paragrafo.split('.') But he ends up breaking the word Dr. too: var...
asked by 05.02.2018 / 16:18
3
answers

How to check if the email is registered when typing on the form? [duplicate]

I have a registration form, and I would like you to let me know as soon as the email is entered, if it is already in the database. I thought of using a JavaScript function with a PHP code inside that will search if there is email in the Ban...
asked by 16.11.2017 / 21:51
1
answer

Is it possible to get the value of a div?

If the div valor0 has a value, how can I get this value in a variable to sum it up for example ?? In this example we have the valor0 div with the value 1, how do I send it to the test variable? var teste = document.getEl...
asked by 05.10.2017 / 13:25
2
answers

Repeat loop logic with for [duplicate]

Consider the JavaScript code below. var r = [2, 5, 6, 18, 20, 10, 23, 12, 19, 10]; var s = [1, 5, 7, 13, 18, 21, 10, 25, 32, 17, 3]; var x = [0]; var i; for (i = 0; i <= 9; i++) { x[i] = r[i]; } for (i = 0; i <= 10; i+...
asked by 19.04.2018 / 23:58
2
answers

Remove text after JS character

I need to remove everything in front of * (asterisk) Javascript example: <form> <div class="form-row"> <div class="col"> <label>Carro</label> <input type="text" id="nome" class="form-contr...
asked by 23.08.2018 / 21:05
3
answers

Increase and Decrease Font, how to apply on a large site?

I have to apply the accessibility feature to increase and decrease font. I currently have 3 buttons: Small Font, Normal Font and Large Font. The idea is that when you click each button, its function is called in javascript. And that the font...
asked by 03.08.2018 / 19:49
3
answers

Detect parts of a string

Hello, this is my first time in stackoverflow, and I'm having a hard time, I need to know how I can detect parts of a string, for example: String: "Definir a altura de %s para %d" I want information % s and % d Example: "Definir a al...
asked by 12.11.2018 / 00:35
2
answers

Retrieving string value JSON

I have a PHP application that returns me a string Json : $cep = $_POST['cep']; $token = ''; $url = 'http://www.cepaberto.com/api/v2/ceps.json?cep=' . $cep; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($c...
asked by 25.07.2017 / 22:15
2
answers

Picking specific characters from a string?

I'm getting the following String in Javascript: Nome Sobrenome <[email protected]> How do I get only the email that is within <> ??     
asked by 31.08.2017 / 16:12