Questions tagged as 'javascript'

3
answers

Run Ajax script automatically

I have a problem with a college project. I would like to know how to run this Ajax script automatically: <script type="text/javascript"> function buscaCep() { var cep = $( "#cep" ).val(); var infos = { 'iCep': cep...
asked by 16.04.2018 / 17:18
2
answers

How to make logic enable text field at a time when filled

How should I proceed with logic? There is a data record form on the page, namely: Name Surname Age Mobile I need to leave these fields as follows: 1- When the page loads the Last name , Age and Cell phone fields should be...
asked by 20.04.2018 / 01:02
1
answer

Problems with NaN return in JavaScript

Personal in this code of a simple calculator (not yet completed), my variable resultado when displayed always shows NaN , I wish they could help me to correct this problem, I'm not finding the is not a number .           ...
asked by 23.04.2018 / 22:32
1
answer

How do I get part of the string from the size of a word?

I want to take only the name of the subject of a h1 containing the following text: "ENF N1A METHODOLOGY OF SCIENTIFIC RESEARCH (MONTH)". In the case what interests me in this string is the value "METHODOLOGY OF THE CINENTÍFICA RESEARCH". The ide...
asked by 16.04.2018 / 16:53
3
answers

execute JQuery calculation for each corresponding div

I'm creating a star rating system but I can not get the jquery to apply the correct Width for each span in the example below. I have three DIVs and each of the 3 divs inside them has <span class="ratingAverage" data-average="1.2"></sp...
asked by 21.09.2018 / 23:58
2
answers

Background Dynamic URL

It is possible to create a dynamic array of images and it is called inside the background-image: url ()? With the hint that was passed by @hugocsl earlier, I would like to reuse this statement line because it is part of a page loader that I u...
asked by 26.04.2018 / 23:11
1
answer

Problem with click event

I need to get the click event of a button from class btn-remove , however, it is giving the following error:    Uncaught ReferenceError: $ is not defined <html> <head> <meta charset="utf-8"> </head> &...
asked by 23.09.2018 / 19:15
2
answers

I want to write a for ... of loop where the first letter of the day is changed, in the array, to uppercase

I have my code, I just do not know how to end it ... const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; for (day of days) { console.log(day); }     
asked by 19.09.2018 / 04:14
1
answer

What's the difference between document.querySelector and getElementsByTagName?

I would like to know the differences in the use of these two commands, because for min that I am in the beginning of the study very similar and even equal in some moments, but having different nomenclatures one must have differences between the...
asked by 27.08.2018 / 16:19
2
answers

jQuery mask is not working

I want to put a mask on the phone number but it is not working, I've tried it anyway, with different ways to call the jQuery and jQuery.mask file. I'll show you how my code is, am I doing something wrong? (in another project I did exactly that w...
asked by 30.08.2018 / 13:37