Questions tagged as 'javascript'

1
answer

What is the difference between Prototype and an Object?

I use new to create objects in javascript and so I noticed quite superficially there is not a big difference between instance with new and using prototype. What is the difference and what is the advantage of using prototype?     
asked by 19.12.2017 / 00:40
1
answer

Calculate integral trapezoid mode

I need to calculate integral with the trapezoid method. I believe the error can be in for . I had tested them step by step and it worked. function integratrapezio(){ var elmbasea = document.getElementById("valoresdex").v...
asked by 04.11.2017 / 00:08
1
answer

Play musical note through JavaScript

I need to create a code that reproduces the sound according to the musical notes informed ... function music(){ var partitura = ''; var escala = 'CDEFGABC'; var notas = escala.split(''); for (var i = 0; i < notas.length;...
asked by 02.01.2018 / 15:06
1
answer

HTML - How to get values from a tag

Hello, I need some help. I would like to know how to get values from an html tag using javascript. such as: grabbing the marginLeft value of an image that was determined by a css file. I hope I have been clear, thank you ...     
asked by 02.08.2016 / 14:06
2
answers

javascript alert - disable "Block confirmation windows from this page?"

When we use the alert several times open a checkbox where the user has the option to disable the alert, is there any way to disable this feature? ( Never checkbox )     
asked by 31.07.2015 / 22:02
1
answer

Try / catch in JS

I have an array called agenciasUri , which formats the data before inserting it into it. After that, I set the JSON jsonObj to send a request. What I find strange is that it's working properly. Why can I access agenciasUri...
asked by 23.07.2015 / 13:55
2
answers

Do I need to include jQuery on all pages?

Is it necessary to put the script of the production jQuery each time it starts a new encoding?     
asked by 06.04.2015 / 04:47
3
answers

get element after being inserted into the DOM with jQuery Append

My page has a selectbox, with some segments, when a user selects a segment, through the on change event of jQuery, it takes the value of the selected <option> and inserts an input hidden with the value of this option within a...
asked by 15.05.2015 / 21:18
1
answer

JavaScript: how to count the characters of an html text?

The problem: I have a html formatted text and I need to count how many characters (ringtones for journalists) I have. I'll use JavaScript. Some solutions came to mind, but as this will be done repetitively, I decided to analyze better before lea...
asked by 09.03.2015 / 15:22
3
answers

How to create an array inside another array with jQuery

I'm trying to create a array in jQuery using the .push () function where each element should contain another array inside it. The framework I need to create is this: array( 'elemento1' => array( 'elemento1...
asked by 15.05.2015 / 20:22