Questions tagged as 'javascript'

2
answers

How to make a script that generates a random background color on the site?

Here's my code, I do not know what's wrong: var x = Math.random(); if (x < 0.5) { document.getElementsByTagName('body').style.backgroundColor = "lightgrey"; } else { document.getElementsByTagName('body').style.backgroundColor...
asked by 10.07.2017 / 23:18
3
answers

Scroll an array and insert values in the middle of it

I need to create a program in JS that receives a requirment of user digits (ex: 11223655871) and returns the sequence with '-' between even numbers and '#' between odd numbers, ie the result will be: 1 # 12-2365 # 587 # 1     
asked by 03.11.2018 / 15:10
1
answer

DropDownList field and Checkbox triggering a javascript function

I have two DropDownList and Checkbox fields that are responsible for entering value into an inputtext How to make the javascript code know the status sent true or false from the CHECKBOX for the function. DropDownList <div class="...
asked by 29.10.2018 / 03:40
1
answer

Date value coming from JsonResult function 18/11/2018 00:00:00 javascript receives "/ Date (1542506400000) /" [duplicate]

I'm having trouble receiving a JsonResult function that returns me a certain date and this date I'm not able to move to the Date field of my screen for reasons other than the formatting of the field. The function C # JsonResult...
asked by 30.10.2018 / 03:44
1
answer

Jquery, exchange images when clicking

When I click on the image it changes the text, when it clicks on the bottom, it changes the text but I need it when I click on the image, which activates the jquery function, change the image. So, for example, I need to switch% from% to% with%...
asked by 31.10.2018 / 16:48
2
answers

Searching for array value inside another array and returning

Look at the scenario: I have the following array's let arr = [23,0,0] let coresLinhasPorPocsag = ["#4d79ff", "#ff6600", "#00cc88", "#b31aff"] I need to get the color according to the position of the array arr I can ge...
asked by 01.10.2018 / 22:01
2
answers

How to make a Countdown with jQuery that restarts weekly

I have to do a countdown timer for a promotion. I need this counter to restart every Tuesday at 00:00 p.m. to make it look something like this:    "Only 6 days remaining 12 hours 42 minutes and 37 seconds left for the end of the promotion"...
asked by 16.11.2018 / 18:31
2
answers

I need help with this code ES6

I'm trying to get the data that's coming this way: [ { "name":"JONAS", "languages":["php","javascript","java"], "age":37, "graduate_date":1044064800000, "phone":"32-987-543" }, { "nam...
asked by 19.11.2018 / 03:07
1
answer

How to pass more than one url to ajax consume json?

I need to create div's with data from two urls with json via ajax, and the data will be returned on the same page, however I need to pass two urls as a parameter, how can I do this? var url_aparecida = 'https://upvagasweb.000webhostapp.com/ger...
asked by 27.11.2018 / 19:43