Questions tagged as 'javascript'

1
answer

how can I capture the value of an input that is duplicated with its same id from javascript

I have this problem and I have already managed to capture two texts that come from php, but I have not been able to capture the value of the input which I must fill with numeric characters and show them in an emerging modal that allows verifying...
asked by 18.01.2018 / 16:14
3
answers

Get input value

I would like to know how to show the value of the input in an alert, immediately at the moment that I finish writing inside the input that shows it to me. In JQuery function mostrar(num) { var x = $("#num").val(); alert(x); } &...
asked by 29.10.2017 / 13:17
1
answer

How to create an object where the keys are the names of another object

if we have the objects const leagues = [ { id: 1, country: 'England', name: 'Premier League' }, { id: 2, country: 'Germany', name: 'Bundesliga' }, { id: 3, country: 'France', name: 'Lige 1' } ] const teams = [ { id: 1, count...
asked by 28.12.2018 / 16:06
1
answer

retrieve value cell table with javascript

I would like to retrieve the value of the cells in the first column of a table. The table has a button in the last column with which I open a modal and I want to show the idClient corresponding to that row. I'm pretty stuck in javascript, really...
asked by 24.05.2018 / 21:09
2
answers

Error in alert, javascript and html does not appear at alert

function btn() { window.location.href = "index.html"; var precioP = document.getElementById('precioP').value; var nombreP = document.getElementById('nombreP').value; if (precioP == "" || nombreP == "") { alert("achu...
asked by 13.05.2018 / 05:46
3
answers

Jquery does not run [closed]

I'm trying to put a jquery code inside the script tag but nothing happens: <!DOCTYPE html> <html> <head> <title>Pruebas Javascript</title> </head> <body> <...
asked by 18.07.2017 / 11:55
1
answer

JSON ObjectArray with Keys and Values [closed]

I've been trying to make the ObjectArray print The key value without having to specify userData [i] .name; userData [i] .lastname; userData [i] .age; Just put the key in an array like: var variables = ["name", "lastname", "age"];     
asked by 30.05.2017 / 03:28
1
answer

Simulate JavaScript key

Good morning, I have a game in JS that requires a keyboard. Two keys The change of the keys is quite compliant. I want to add a button that simulates the pressing of that key. <button onclick="presskey('32')">A</button> functi...
asked by 25.10.2017 / 15:31
2
answers

Is there any way to get the value of the onclick? [closed]

In other words, I would like to obtain the value of the onclick="ejemplo" obtain the function of the onclick     
asked by 10.07.2017 / 13:45
1
answer

Geolocation in HTML5

I have the following code: <!DOCTYPE html> <html> <body> <p>Presiona el botón para obtener tus coordenadas.</p> <button onclick="getLocation()">Try It</button> <p id="demo"></p> <scr...
asked by 30.06.2017 / 01:52