javascript

javascript

Please help me write a small JavaScript code to increase the number in the input field

Question: There is such a script function timer() { var seconds = 5; var seconds_timer_id = setInterval(function() { if (seconds > 0) { seconds –; if (seconds < 10) { seconds = “0” + seconds; } $(“.videotime”).text(seconds); } else { clearInterval(seconds_timer_id); $(“#allcount”).val((+$(“#allcount”).val() + 1)); } }, 1000); } which i …

Please help me write a small JavaScript code to increase the number in the input field Read More »

javascript – Regular expression for a password of 6 characters or more using numbers, special. characters, Latin, the presence of lowercase and uppercase characters

Question: You need to set up a regular expression for "Complex password": from 6 characters using numbers, special. characters, Latin, the presence of lowercase and uppercase characters. If the entered characters do not match the given expression, then return false; Answer: Positive look ahead must be used. It will ensure …

javascript – Regular expression for a password of 6 characters or more using numbers, special. characters, Latin, the presence of lowercase and uppercase characters Read More »

javascript – How to force '.on("input")' method via script?

Question: I suppose my method: $(document).on(“input”, “#textbox”, function(){ alert(“oi”); }); What script can I force the alert("hi") call? I tried several and nothing: $(“input#textbox”).val(“1”); $(“#textbox”).val(“1”).on(“input”); $(“#textbox”).input(“1”); $(“#textbox”).input(“1”).change(); http://jsfiddle.net/Lyqu4s92/ Expected behavior: When typing a character in the quantity field, a function must be called that will calculate the value and quantity …

javascript – How to force '.on("input")' method via script? Read More »

=> Operator in JavaScript

Question: I'm learning JavaScript, on Wikipedia I came across an example of describing multidimensional arrays the code is like this: // Создание двумерного массива чисел: var array = [ [11, 12, 13, 14, 15, 16], // Первая строка-массив [21, 22, 23, 24, 25, 26], // Вторая [31, 32, 33, 34, …

=> Operator in JavaScript Read More »

Scroll to Top