Questions tagged as 'javascript'

2
answers

How to filter an array using the For structure?

How can I filter an array using the for structure? The code is this: const numeros = [1,2,3,4,5,55,190,355,747,1000,125];    I need to filter the numbers under 10. I used it this way, but I was asked to create one using the...
asked by 23.01.2018 / 01:59
3
answers

How to get the title of an HTML page and return its value in JavaScript

I need to know exactly how to return the title of the page: <title> nome </title> Returning this way:    You are on the 'name' page. I've seen a question about a few years but I could not.     
asked by 09.01.2018 / 12:45
3
answers

Redirect users through a form

I need to create a simple html page, with only one form field type="number" . When the user clicks he is redirected to a url www.example.com/o_que_ele_digitou_no_formular Page Purpose: We are organizing an event and want the co...
asked by 08.12.2017 / 13:43
2
answers

How to convert date and time with JavaScript? [duplicate]

I have a string date in the following format:    Dec 11, 2017 01:00AM . I need to convert the date to the following format:    11/12/2017 and the time for this format:    01:00 . I thought of treating...
asked by 11.12.2017 / 17:51
3
answers

window.close does not work

I'm implementing Dialog for Jquery UI in my application. When the dialog is closed it should close the current window using the window.open(); method of javascript. However this does not occur, and the following error is still displaye...
asked by 18.09.2014 / 22:30
3
answers

Print without confirmation window in PHP, Javascript or Ajax

I have a non-fiscal Zebra TLP 2844 thermal printer, and I'm developing a password generation program to print on this printer. I'm using the printer_ functions. I tried the following sample code: <?php $handle = printer_open...
asked by 14.09.2014 / 22:23
1
answer

How to compare 2 powers

I need to compare 2 powers that are not formatted .. Example: 2,2 = 2² 3,3 = 3³ if (2² > 3³) The numbers arrive in an array, so it comes [2,2,3,3], I need to separate them in pairs and need to turn a power ......
asked by 03.09.2014 / 22:03
2
answers

CPF mask error

I created a form but when I put a mask in the CPF to stay like this Ex. (000.000.000-00) does not assign <head> <meta charset="UTF-8"> <title></title> <script src="JS/funcoes.js"></script> &l...
asked by 09.11.2017 / 18:45
2
answers

Is it possible to sum the values of td using querySelectorAll?

I wonder if it is possible to sum the values contained within the td using querySelectorAll? And show the result of the sum in span id="valor_total" as shown in the code below. function somaTds() { var selecionados = [].slice.cal...
asked by 22.05.2017 / 18:04
3
answers

Add minutes to Javascript

I'm doing something to calculate the sum of hours and minutes, and I see no solution. I need to get a pasted time formatted so 09:00 , but with random time in a input and clicking on submit change the html with the input time wit...
asked by 20.11.2017 / 12:11