A
A
andre77772016-03-10 17:48:10
JavaScript
andre7777, 2016-03-10 17:48:10

How to skip only ":" and numbers?

Here is jquery code

$('#cn').on("change keyup input click", function() {
    if (this.value.match(/[^0-9]/g)) {
      console.log('Только цифры и ":"');
    }
});

Now it's just numbers. How to make it so that there are numbers and a colon?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-03-10
@andre7777

this.value.match(/[^0-9:]/g)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question