Questions tagged as 'javascript'

1
answer

How to retrieve via C # the page HTML generated with AngularJS?

How to retrieve the HTML code of a page that uses AngularJS to process some information and generate a chart? I was able to easily retrieve the HTML code using WebRequest as demonstrated in the example below, but the content (graphic) generated...
asked by 29.02.2016 / 15:08
7
answers

How to check if at least one item in the array has a value greater than or equal to 2

I have the following array: array[0,2,0,0]; I need to create a function that returns true if at least one item in the array has a value equal to or greater than 2     
asked by 01.11.2016 / 17:52
3
answers

Information on Mouseover in Photo

Does anyone know how to put a description in the photo, with a transparent black background? As with many blogs, an example is the Rihanna website . Something like a timeline or a blog with thumbnails in photos. Does anyone know how to make...
asked by 17.05.2015 / 04:01
3
answers

Difference between dates

Whenever I move the date difference in the same month, it works, but when it is between different months, comes a negative value. How do I make a difference between dates? Look at my code. The error is in total Code if (($("#txtDat...
asked by 15.04.2014 / 19:35
3
answers

How to add +1 in a countable variable with each click?

Each time I click a button, I want to add +1 to a variable. For example: I have a count variable getting a value of 5, when I click a button I want the value 5 to change to 6 and so on, displaying in alert() . Is it possible?...
asked by 19.02.2014 / 23:09
3
answers

Star vote with input radio, javascript / css

I am creating a registration form, in it I will insert a voting system, I wanted to do that when clicking on some star, the previous ones will change color as well. (Here is the code I created) <div class="vote"> <label> <in...
asked by 22.06.2015 / 17:41
5
answers

indexOf does not find element in an array

The indexOf() is returning -1 even though I have this element, I'm doing this: pessoas = []; pessoas.push({"nome": "Pedro"}) pessoas.push({"nome": "João"}) pessoas.push({"nome": "Maria"}) pessoas.push({"nome": "José"}) console.log(pess...
asked by 30.10.2018 / 20:11
3
answers

Why JavaScript objects are not always JSON?

This for example: { "nome": "Meu nome", "sobrenome": "Meu sobrenome" } Can it be considered an Object and also a Json? If not, why not? What will differentiate one from the other is when instantiating?     
asked by 11.07.2018 / 12:45
1
answer

Select GridView line with checkbox

function Selecionar(elemento,cordefundo) { var Inputs = elemento.getElementsByTagName("input"); var cor = elemento.style.backgroundColor; //manter a cor default do elemento for(var i = 0; i...
asked by 11.10.2015 / 21:30
6
answers

How to prevent submitting an empty form?

I have a custom search form for Google Search, and I want that, if the search field is empty, submit does not happen. Can you block this via JavaScript?     
asked by 04.11.2014 / 16:03