Most voted "javascript" questions
Use this tag when the question refers to some feature, information, or problem that relates exclusively to the Javascript language (not to be confused with JAVA). Javascript is an implementation of Ecmascript, a dynamically typed, object-oriented, prototypical-inherited language. It is used for client-side scripting, but can be run in desktop or server-side applications using tools such as Node.js.
Learn more…26,588 questions
Sort by count of
-
-5
votes1
answer332
viewsHow to set decimals in JS?
I’m not getting the right decimal places, where the error is? function calcula() { var total = 0; $("span[id^=linha]:visible").each(function() { var val_unit = parseFloat($(".class_unit input",…
-
-5
votes2
answers10307
viewsCalling modal by javascript
These are the files referring to boot and js. I inserted them in the Layout page <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"…
-
-5
votes1
answer650
viewsDownloading HTML from a page
I would like to know a way or plugin that helps me to download the HTML of the page in format .html. My goal is to make it possible to edit images and texts in an image and finally to download it. I…
-
-5
votes1
answer859
viewsHelp with error - comparisons against strings
Hello, Good night! I am on a platform of studies in which exercises and tests are performed, the statement is: Sets the function today Magazine, which receives by parameter a string that informs the…
-
-5
votes1
answer72
viewsFormat a table’s value
I have a table that I receive date data in this format: -'06/05/2019 09:07:34 and -'06/05/2019 always with these characters -'. I would like to format the values of the date columns to 06/05/2019…
javascriptasked 4 years, 12 months ago Fragosojp 35 -
-5
votes3
answers67
viewsI’m having trouble developing my code
Enunciation: Loop with Array - Negative Balance A company sent a list containing the monthly numbers of everything it billed, and our job is to help them create a report that shows in how many…
javascriptasked 4 years, 7 months ago Nicholas Gerade 1 -
-5
votes2
answers85
viewsHow to calculate 2 inputs with comma and appear in a third input?
I have this script but it doesn’t work: <input type="radio" autocomplete="off" required value="Dinheiro e Cartão" name="pagamento" id="termos2"/> <span class="titulos_pgmnts">Dinheiro e…
javascriptasked 4 years, 6 months ago Felipe 1 -
-5
votes1
answer28
viewsHow do I make my application understand which delete button I am clicking and delete the right list?
I have an app that adds a list for the person to put a new schedule every time they click on a button, that new list comes with a delete button on the side, but when the person adds more than one…
javascriptasked 4 years, 6 months ago Lucas Alves 15 -
-5
votes1
answer878
viewsDiscord bot help command with Command Handler
It is possible to make a help command where it looks for an element of the module.exports guy... module.exports = { name: 'help', description: '...', execute(message, args){ } and within the…
javascriptasked 4 years, 5 months ago pulse 1 -
-5
votes1
answer42
viewsPage redirection when performing research
Personal I have the following code below: Where the user will perform the search in the input, and will click the "button " next, where activates the onclick event that redirects the same to page…
-
-5
votes1
answer60
viewsHow to delete a JSON within an Array in localStorage()
I’m creating an app for annotations and I would like to be able to delete the respective note, when the user clicks, I created this function but it is not returning anything to my localStorage(), I…
-
-5
votes1
answer25
viewsCode in Browser async/await
Code: async function verifyEmailSend() { try { if (!document.querySelector("#showAllThreads .pl63")) return false var coments = [...document.querySelectorAll("#showAllThreads .pl63")] espereResolver…
javascriptasked 3 years, 6 months ago Matheus Nascimento 5 -
-5
votes2
answers83
viewsI can’t change the icon and text inside a button
Personal how could I make a button that changes text and icon when clicked? and click again return to the original button? could help me function mostrar(e) { if…
-
-5
votes0
answers18
viewsSwitch between classes in pure javascript
I’m having trouble making switches alternating classes. <script> function toggletransicao() { var element = document.getElementById("myDIV"); if(element.classList.contains('lightSpeedIn') ==…
javascriptasked 3 years, 5 months ago Arsom Nolasco 1,367 -
-6
votes1
answer917
viewsPlace a pager in json
A friend helped with the code, but I need to make it display 5 results per page and have a pager like < >. var operacao = "selectOcorrencias"; var condominioID = "2";…
-
-6
votes2
answers1371
viewsHow to catch event that closes the browser?
I am trying to clean my localStorage before the window is closed and I tried to use window.Unload and also window.unbeforeload. However, when using them they clear the localStorage if I just reload…
-
-6
votes1
answer44
viewsWhat is the Regexp equivalent of split("") in JS?
I want to split the number PI 3.141593 into an array that does not contain '.' and all separate numbers. I tried to split . split(/[ .""]/g) but it didn’t work. What would be the equivalent…
-
-6
votes2
answers83
viewsJavascript image
I need the user to write a correct password and an image will appear <html> <head> <title>SENHA</title> </head> </html> <script> var senha = ('teste') var…
javascriptasked 3 years, 6 months ago Victor Hugo 1 -
-6
votes1
answer57
viewsHelp checking
I’m with making a record that I need verification prints an error if any of the options are changed. My code: $(document).ready(function(){ $("#concluir").validate({ rules:{ usuario: { required:…
-
-6
votes1
answer246
viewsWhat is the addListener function for?
I know how to use the addEventListener, but I don’t know what the addListener, I searched and found no specification on this function. <!DOCTYPE html> <html> <head> <meta…
javascriptasked 5 years, 6 months ago Dom Domdomdom 192 -
-6
votes1
answer58
viewsReturn the original radio button image when selecting another
Friends, good afternoon. I’ve been racking my brain for 2 days because of this: I have 2 radio button that has an icon and a text: when I select one, the icon is replaced by a lighter icon (white),…
-
-6
votes2
answers415
viewsSearch in the database with select
I am developing a website to display registered videos, for this I did with a select to select the desired discipline of the user. Soon after I put a button to display these registered videos…
-
-6
votes2
answers120
viewsHow to organize a JSON by date
I have this JSON and I must arrange it by data: { "clients": [ { "id": 1, "name": "Juca" }, { "id": 2, "name": "Beto" } ], "purchase": [ { "client_id": 1, "data": "11/04/2021", "total": 100.0 }, {…
-
-7
votes1
answer1161
viewsHow to script C# to run HTML
I developed a C#(Csharp) script for web pages! But I don’t remember how to add the script tag being the C# language and not javascript.
-
-7
votes2
answers728
viewsCountdown of days passed from a given date, using the <form>
I wish someone would help me with this script. As in the image, I need to take the date I will insert in the blanks and count how many days have passed until such a day. Could someone help me with…
javascriptasked 7 years, 5 months ago Bruno Mota 1 -
-7
votes2
answers1140
viewsHow to change the color of a div every 40 seconds?
I would like a div was alternating colors, two colors preferably. If you want you can put more than one example. But my preference is that the color changes every 40 seconds.
-
-7
votes2
answers668
viewsFormat pennies in real
Good afternoon, you guys. I’m trying to format pennies for real. That is to say var number = 312311 turn: R$3.123,11 But I’m having a hard time. How would I do that?…
javascriptasked 6 years, 2 months ago Igor Martins 659 -
-7
votes2
answers135
viewsOver or under age
Good afternoon, everyone. I’m a beginner and started a Javascript course. I’m trying to do this exercise: Make a Script to ask the user for his name, age, city of birth and UF. Write on the page the…
-
-8
votes1
answer124
viewsDifficulty when combining web languages
I’m a beginner in web programming and I’m making a mess when it comes to mixing the codes, I have studied a lot but I still have a lot of doubt at the moment to combine all the codes, for now I use…
-
-8
votes1
answer60
viewsHow do I pass parameter by onclick?
How do I pass this parameter that is within the row by parameter in onclick?…
-
-8
votes1
answer268
viewsHow to return selected items in a <select Multiple> with jQuery
I need to receive the values of a comma separated $('select[Multiple]'). val(). For example. The HTML code: <select id="estado" multiple> <option selected>SP</option> <option…
-
-8
votes1
answer548
viewsHow to enable/disable a Div when clicking the checkbox
How to turn on and off a div by clicking on checkbox $("#chkBloqueio").click(function() { if ($("#chkBloqueio").attr('checked') == true) { $("#divBloqueio").attr('display', 'inline'); } else {…
-
-9
votes1
answer2229
viewshow to start youtube video automatically in iframe without autoplay?
how could I do that in this code below <iframe width="420" height="345" src="https://www.youtube.com/embed/Y3wtmZ4Ds3M?autoplay=1" frameborder="0" allowfullscreen></iframe> no matter the…
-
-9
votes1
answer407
viewsHow to change the mask of an input type date
How do I solve this problem ? I want to remove this "dd/mm/yyyy"…
-
-9
votes1
answer42
viewsCan anyone solve it?
Can anyone solve this problem? I would like to know the answer of this code! . . . . . RegExp.name[5] + (undefined + '')[5] + 'x' + Number([]);
javascriptasked 5 years, 2 months ago samu 1 -
-10
votes1
answer1305
viewsHelp for a Javascript exercise with for...of and Join()
Given the following object array: var usuarios = [ { nome: 'Diego', habilidades: ['Javascript', 'ReactJS', 'Redux'] }, { nome: 'Gabriel', habilidades: ['VueJS', 'Ruby on Rails', 'Elixir'] } ]; Write…
javascriptasked 6 years, 10 months ago Eduardo Candido 35 -
-10
votes2
answers290
viewsWhy should we use HTML 5 instead of Javascript?
What are the advantages and disadvantages of using HTML 5 instead of Javascript? Since, in Javascript we can do everything that HTML 5 can do, but the opposite does not happen... References:…
-
-15
votes2
answers128
viewsAdjust the value of cents
I have a variable with the following information: 100.3 What better alternative to make 100.3 to 100.03?