Questions tagged as 'javascript'

1
answer

Accept only all regular subexpressions

I have a word, for example, hola , and I want to make a regular expression that accepts all subexpressions. That is, you have to accept h , ho , hol and hola . For this I do ^(hola)|(hol)|(ho)|(h)$ Is the...
asked by 28.11.2018 / 21:11
3
answers

Query about PHPMAILER

I wanted to know if the PHP setup I'm doing for the submission in a form is well-armed. From what I read in the documentation I have to download two PHP files, the Class.phpmailer.php and the SMTP.php and link them the way I'm doing with a requi...
asked by 16.11.2018 / 20:45
1
answer

document.getElementById does not assign the id to the variable and it is null

I'm doing a modal with the following html <button id="btnModal">Ver</button><!--class="button"-- sacamos esto del button--> <div id="simpleModal" class="modal"> <div class="modal-content">...
asked by 13.12.2018 / 10:56
1
answer

difference between object.property vs. object [property]

/* property01.js define propiedades de un objeto */ var o = {a:1, b:2, c:3, d: 4}; for (var i in o) { console.log('o[' + i + ']: ' + o[i]); console.log('o.' + i + ': ' + o.i); } /* salida o[a]: 1 o.a: undefined o[...
asked by 05.12.2018 / 23:04
1
answer

Problem using .clone () and select

I am passing elements from one section to another, the big problem I have, is that when cloning it does not save the option selected, simple example to understand me: <div id="content"> <div class="copy"> <select>...
asked by 29.11.2018 / 03:47
1
answer

Change image with mouseover [duplicated]

Having an event mouseover , I would like that when you move the mouse over the image, the image changes depending on what the current image is, if not, it is not changed. HTML <body> <img src="ikefeliz_2.png" id="imagen"&g...
asked by 13.08.2017 / 17:40
1
answer

How to show the values of all the radio type inputs that have the same class?

I want to get all the values of the radio type input to then compare it with a variable with a set value and if some of those radio type input matches the value of that variable I select that radio type input I've been trying to get the amoun...
asked by 27.04.2018 / 08:49
1
answer

Play two audio at the same time

I have an audio repository on my website and I would like to be able to play more than one at a time, but I can not figure out how to do it. I leave the code in case anyone knows the answer: var $player = $('.js-audio-player'), $pl...
asked by 18.04.2018 / 14:41
2
answers

How to capture a variable type int in js?

Well, I do not know if I made myself understood correctly, so I explain. I am working with what is HTML, JS, PHP and MySQL. At the moment my only problem would be with JS. I'm trying to use an if, to compare 2 numbers, one has to be yes or if le...
asked by 12.04.2018 / 23:14
1
answer

Redirect from Login in html

I'm trying to make a login in html and validate if the username and password are correct with a javascript (for the moment I only see if username and password are the same), and depending on whether they are correct or not redirect me to one pag...
asked by 31.03.2018 / 19:46