Posts by MonneratRJ • 151 points
5 posts
-
0
votes2
answers114
viewsA: Button Submit does not open modal
All <button> within a <form> acts like a Ubmit, and this reloads the page, to prevent the page from being reloaded you need to PREVENT the default behavior of the browser with the…
-
1
votes2
answers256
viewsA: Subtract value using JS
First I would advise to use the discount values in decimals, example 5% = 0.05, 10% = 0.1, 15% = 0.15... etc... const desconto = res.querySelector('[name="desconto"]');…
-
0
votes1
answer23
viewsA: Xmlhttprequest does not find execute (Duplicate)
Hello I would change your code to: window.onload = () => { //Constantes que são pegas do Formulário const name = document.getElementById('name'); const mail = document.getElementById('mail');…
-
3
votes2
answers93
viewsA: Add students' grades in Jquery or Javascript
To identify each ROW, I would use an ID in your TR, so you could easily take the values by querySelector, I would also take the [] of the Names, this indicates a vector. var nota1 =…
-
8
votes2
answers3481
viewsA: Regex for strong password
Your expression should look like this: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[$*&@#])[0-9a-zA-Z$*&@#]{8,}$/ Explaining in more detail: /^ (?=.*\d) // deve conter ao menos um dígito…