I'm trying to create a national document validator that accepts numbers and letters or just an 11-character JavaScript limit number.
The problem is with regex creation.
Follow the code:
var documento = 'abc123-$/';
alert(documento.replac...
By default, in a horizontal menu the content is read from left to right, as in this image: However,Iwouldlikethatwhenthecontentloads,thescrollbaris,say,automaticallymovedtotheright,asinthisimage:
Is this possible?
Good afternoon, guys.
My question is the following, I am creating a payment form, I have the following code:
$(".spanhover").hover(function(event) {
var divid = "#popup1"
$(divid).css({top: event.clientY, left: event.clientX}).sh...
I am creating a small shop that will sell shirts for an event and the sale of the shirts will be limited to a maximum of 4 shirts per person, so I need that in the field where the number of shirts that the person wants to buy is defined is limit...
Hello, I was doing a test in javascript to see if the value of two inputs were different, if they were I would change the background of an input to red, and tried opening the style tags inside the if and instead of appearing so
appearslikethis...
I have two inputs that both have an id, and I have a button with an oncick event bound (directly in HTML) that receives the value of both input fields as input, now I want to separate javascript into a separate file, but I can not make the javas...
Well, I need to create a way to recognize which menu I'm clicking on, I have my index where I call my menus with an include, so I need to put a green bar in the bottom of the menu that is clicked.
How to do this?
<ul class="mainnav">...
This code solves the problem of finding the num prime between 0 and 10,000:
function PrimeMover(num) {
var counter = 0;
var primes = [];
for (var i=2; i<=10000; i++){
for (var j = 2; j<i; j++){
if (i%j===0) { cou...