Questions tagged as 'javascript'

3
answers

Subtract data from an array from another array- Javascript

I have the following 2 array: Array 1: var datos1=[1,2,3,4,5,6,7]; Array 2: var datos2=[3,5,7]; What I want is to fill a new array where the data that is not present in var datos2 is saved, for example: [1,2,4,6] , I am...
asked by 22.02.2018 / 05:06
3
answers

Apply CSS style to a row of an html table depending on a value

I have a common html table, with a column called "status", whose possible results are "yes" and "no". and I want to make all the rows whose state is="not" paint them in another color. How can this be done with jQuery? <table> <tr&g...
asked by 18.04.2017 / 18:14
2
answers

Get backgroundColor of a div when you click (JavaScript)

I'm doing a little game of a drawing palette working with the JavaScript DOM. I want to click on each div with a background color, select that color. I do not know what I'm doing wrong, because when I access the property style.backgroundCo...
asked by 12.02.2018 / 12:31
3
answers

How do I enable an input disabled when selecting a select with jquery?

I have a select with two values (allow and not allow), and under this select two input disabled to type the password, the idea is that if you select the value allow me to automatically enable the input to enter the password ... I leave the sim...
asked by 10.03.2017 / 23:40
3
answers

Give color with JavaScript

I have this table: table, th, td { border: 1px solid black; border-collapse: collapse; } <table style="width:100%"> <tr> <th>Firstname</th> <th>Lastname</th> <th>Ag...
asked by 25.07.2017 / 17:16
2
answers

Obtain the dimensions of an image in Javascript

Can JavaScript get the size of the image? that is, if it is in a web element image with width and height you get what it takes to screen, but I'm interested to know what is its actual size.     
asked by 09.06.2017 / 11:02
2
answers

Problem rotating an array

I have problems with my program .. I think it's coding .. it's the first time I play javascript and I'm a bit lost .. Basically what I have to get is that my array of colors moves ... that is, the gray color goes to the last one ... a rotatio...
asked by 14.03.2017 / 19:44
2
answers

Move a node of type element

Why do I have to press the button twice to change the items on the list? function cambiarPosicion() { var lista1 = document.getElementById('lista'); var hijo = lista1.firstChild; var lista2 = document.getElementById('lista2');...
asked by 07.08.2017 / 17:03
3
answers

How to correctly use the event click on Javascript?

Good day I do not understand what the error is, what I want is that when you touch Hello , change to Mundo function cambiardiv(){ var i=document.getElementById("a").click="Mundo" } window.onload=cambiardiv; <!DOCTYPE html&...
asked by 24.11.2017 / 18:24
3
answers

Capitalize word and phrase taking into account signs and accents

Good, I am having problems when capitalizing correctly both words and phrases when there are question marks and / or admiration at the beginning and also when there are tildes both at the beginning of the word and in the middle of it. I tried...
asked by 28.08.2017 / 17:56