Questions tagged as 'javascript'

1
answer

Console.log displaying all data in the array

When I run the javascript code below: var dados = Array(); for (var i = 0; i < 2; ++i) { dados.push({index: i}); console.log(dados); } The output in the browser console for the first interaction will be: [0: {index: 0}, 1: {i...
asked by 17.10.2018 / 13:21
3
answers

How to run Url.Content via Client?

In ASP.NET MVC, you can run @Url.Content on views and controllers. This variable returns the relative level the site is in. My question is: how to run Url.Content via JavaScript? Is there any way in MVC? EDITED Example o...
asked by 07.02.2014 / 02:33
2
answers

Reset page by reset button

I have a very simple problem, but since I'm a beginner in javascript I can not do it. With this code, I need to create a function that resets the page without reloading it, whoever can help I thank. var tabela = ""; var t = 0; for (...
asked by 25.09.2018 / 22:50
1
answer

How to break lines according to a value

How do I break lines by value? For example a = 8. Then I have a "d" variable that receives a string. var d="written work considered in its original wording". If I put an If = a; it traverses the string by always counting q for 8 characters it br...
asked by 30.09.2018 / 23:58
1
answer

Replace xml tag with nodejs

Hello, I would like some help to remedy a problem I am facing. I need to rename the tags of an xml file by nodejs. I thought about making use of regex, using fs to read the file, but I was kind of lost. <RESULTS> <ROW> <COLU...
asked by 04.10.2018 / 08:15
1
answer

Auto sum system where those that were not clicked are added and zeros where I click

I'm trying to do the following: the screen has to appear from 0 to 36, by the time I click on any of the numbers the value in front of it has to zero. And at the same time in front of all other numbers add +1 to the value you are. And so on with...
asked by 24.06.2014 / 04:37
1
answer

javascript, use the prompt to collect data

<script type="text/javascript"> /* calcular a media de 4 notas */ var n1 = 10 var n2 = 10 var n3 = 10 var n4 = 10 var media = (n1+n2+n3+n4)/4 document.write("Sua média:", media);...
asked by 07.07.2018 / 06:48
1
answer

how to concatenate an object in asynchronous function?

Hello, I'm developing a website to train a bit of js, but I came across the following situation: I have a javascript Object that I created to facilitate Ajax queries, however when I'm doing the requests sometimes a link is solved or finished (I d...
asked by 21.07.2018 / 18:45
1
answer

Error when incrementing value in inputs with same class?

I have a function that creates an input loop depending on the number of parcels inserted by the user and when entering a value in the first it increases by 1 each of the following inputs, so far so good, but if you have entered 10 payments and F...
asked by 04.07.2018 / 21:21
1
answer

Redirect using url parameters

This one is a redirection code, I used it without any url parameters, but now I need it to work according to the parameters and I could not, I'm pretty new to javascript, could anyone explain what I'm doing wrong in my code? If ver is eq...
asked by 21.07.2018 / 03:31