Questions tagged as 'javascript'

2
answers

Download attribute, new line in text file

I'm trying to download a text file with information coming from a array but I would like to separate these values into a new line ... I've tried some bad approaches, but the result remains in only one line. let codes = [ 'sajkh...
asked by 27.09.2017 / 18:17
2
answers

Paint table row when receiving specific data

I have this code: <?php foreach ($controller->Lista() as $objProg) { ?> <tr> <td><?php echo $objProg->getplaca(); ?></td> <td><?php echo $objProg->getmot(); ?></td&g...
asked by 04.02.2016 / 20:16
3
answers

Add or Remove Class from a DIV when clicking

Hello everyone, I'm trying to make sure that when I press 1x in the ".PA" packages, it will make the changes: add class .select CSS: #bottaaoPA: Display: Block; CSS: bottaaoPB: Display: None; CSS: bottaaoPC: Display: None; And whe...
asked by 25.01.2016 / 17:27
3
answers

Change readonly for several fields

I have several inputs with readonly="true" which, when I click the edit button, it should change to readonly="false", but I'm only able to do this if I create 1 script for each input. p> Would you like to make 1 script to change at all? I t...
asked by 15.10.2015 / 21:52
1
answer

Using the sort () method

Personal I have this following js code: var livro = { ISBN : '978-85-7522-347-5', titulo : 'Aprendendo a Desenvolver Aplicações Web', preco : 83.00, autor : 'Semmy Purewal' }; I need to write a sort () expression to sort the vec...
asked by 09.06.2016 / 15:45
2
answers

Get date and time regardless of system time

Well, I'm having a hard time getting the date and time in JavaScript when the computer or system is having this incorrect data. Official time: 08:35 - 07/14/2016 - Brasilia timetable Computer Time: 23:46 - 7/12/2016 No matter what metho...
asked by 14.07.2016 / 13:40
4
answers

Calculate age in years using javascript

How to calculate age from an input type="text" using javascript? I have the input: <input style="width: 100%" type="text" readonly id="data_nascimento"/> How to do this calculation? The date format is "01/01/2015." Do I need to con...
asked by 21.10.2015 / 19:03
3
answers

Clock html / javascript does not appear

I'm trying to make a digital clock appear on the screen, but the browser does not return anything. <!DOCTYPE html> <html> <head> <title>teste</title> <meta charset="utf-8"> <script type="text/...
asked by 06.08.2018 / 23:07
5
answers

Take the last position of a split ()

I need to type a name in an input and show the person's name in the following format: SURNAME (last position), So-and-so. But I'm not able to display the name in this format, and I'm also not able to use .toUpperCase () in the "last" varia...
asked by 06.07.2017 / 23:30
3
answers

Send what is being typed from one input to another in real time

Hello, guys! I do not understand JQuery or javascript, only PHP. I am suffering to create an INPUT 1, which in real time, sends what is being typed into an INPUT 2, with no spaces or special characters. I'm currently handling this in PHP. Exampl...
asked by 11.10.2017 / 22:09