Questions tagged as 'javascript'

1
answer

Count repeated numbers in an array

I have an array that will randomly have between 500 and 1000 positions. And in each position a value is saved that will be between 1 and 50. To get this array I have created the following functions: //Funcion numero aleatorio entre 1 y 5...
asked by 10.11.2017 / 02:28
1
answer

How to filter a table with multiple columns with JavaScript?

Now try the W3 Schools code which is: function myFunction() { var input, filter, table, tr, td, i; input = document.getElementById("myInput"); filter = input.value.toUpperCase(); table = document.getElementById("myTable"); tr = table...
asked by 26.10.2017 / 04:52
3
answers

select the last word of the sentence and make it bold

I have another problem with the string functions, if I try to convert the text in bold of all the strings that are in a pair index of my array I do not have any problem, the code for that is the following lineas.map(function(value, indice){ l...
asked by 28.04.2017 / 02:05
1
answer

Problem removing elements from an array

Hi, I've been trying to do something to remove the elements from an array, and I still can not try it for about 2 hours ... This is a string that is entered by an input text (always of the text form [something], that something can be numbe...
asked by 27.04.2017 / 15:45
1
answer

Date in javascript [closed]

How can I determine a specific day and know how many will be here at a certain date, for example: If I want to know how many times will San Juan fall on Saturday from here to 2100. I imagine that I should do several conditions but I do not know...
asked by 23.10.2017 / 10:13
2
answers

cover image by default css

I have a div that is armed by Javascript and a JSON, this puts an image that brings it from a server, the problem is that if the image is not, the div remains blank. - UPDATE - I do not have the URL in the database, it is assembled in a st...
asked by 20.10.2017 / 23:09
2
answers

Can a textarea be given a source?

It is possible to change the style of what you write there, such as changing the color or size of the letters. If not, what alternatives are there?     
asked by 04.11.2017 / 05:31
1
answer

Show correct status with ng-click

I am trying to do a función that I call doing ng-click , where I want to show the status corresponding to the ítem that I give click , that is, if I give click to the object banana that only me show the st...
asked by 04.10.2017 / 14:05
1
answer

Problems generating JavaScript sums

I am making a script that allows me to perform operations to generate the total cost of the products: var subtotal = 0; var ivaValor = 0; var total = 0; selected.forEach(function(dato) { var pretotal = dato.price * dato.quantity;...
asked by 20.09.2017 / 19:08
4
answers

Modify appearance of an input

Hi, I explain, I have 2 input text and I want it in the first one if you have 4 or less characters, you should use the red form and if you have more in yellow I have it all on the same page and with conditionals if, I thought about while but...
asked by 24.09.2017 / 15:37