Questions tagged as 'javascript'

1
answer

Get parameter of the url via angularJS

Well, I need to get a parameter from my url as soon as my page loads. localhost / 123456 The parameter would be: 123456 Using $ location, I got the url complete, but I can not get the parameter I need to load into my controller...
asked by 06.02.2018 / 05:46
1
answer

Document.Write with variable does not print

Why do not window.document.write(valores) nor $("body").append(valores) not print on the screen? <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0...
asked by 05.02.2018 / 00:59
1
answer

Stop function when mouse / cell pass

I have the following code: I would like to know some function that can stop the cellphone by mouseover for about 10 seconds, after the arrow is removed from above. Thank you in advance! <!DOCTYPE html> <meta charset="UTF-8">...
asked by 06.02.2018 / 03:19
1
answer

Create tight button effect

I have the following component in React: import React, { Component } from 'react'; class Counter extends Component { constructor(props) { super(props); this.state = { count: parseInt(this.props.value) }; this.inc = t...
asked by 07.02.2018 / 21:52
2
answers

Get user connection type in javascript

How can I get the user's connection type in javascript? I want to know if he is accessing my site via wireless, 4G, internet wired ... All this in javascript     
asked by 05.04.2018 / 22:25
1
answer

How to return the last element of the array using the for?

I wanted to know how I get the last element of the array using the structure for in the case for decrement? My code is this: const a = n => n % 2 === 0; function callbackfn (valorInserido, funcao) { for (valorInserido.le...
asked by 25.01.2018 / 21:18
1
answer

Input mask for CPF in html form (without plugin)

I wanted a simple input mask, just to put 999.999.999-99, dots and the last dash in the cpf field, no verification, no nothing, simple, and no code only plugin, if I am not mistaken have the regrex or something similar, I appreciate the attentio...
asked by 11.04.2018 / 16:37
1
answer

Open this window.open in a centralized window

I have the following script that takes all links from a page and opens in a window, How can I open the result in a centralized window? javascript: var w = window.open('', '', 'height=800, width=600');var a = document.getElementsByTagName('a');...
asked by 11.04.2018 / 23:40
3
answers

How to validate numeric fields in javascript?

I need to assemble a code in HTML x Javascript, with two fields for entering numeric values and a button for calculate. When you press the calculate button, the application should output the result of the sum of the two values entered on the scr...
asked by 14.04.2018 / 20:14
2
answers

Filter items by highest attribute

[ {x:'Pedro', y:2}, {x:'Lucas', y:3}, {x:'Pedro', y:4} ] What would be the best filtering that is repeated in the value of X, remaining the one with the highest value in Y?     
asked by 04.06.2018 / 18:59