Reputation: 402
I am trying to create an input field for an IP address, broadcast, and subnet. The inputs are used to change the ip of the server. Its an internal website.
I want to make it so that the user gets an input box that has the periods hardcoded into the text box. This way when they start typing, they only have to input the numbers and be able to tab to the next part of the ip. Or if the user enters 3 characters, it automatically sends him to the next part of the ip.
I don't know if this is something that can only be done with html and css or if this is more of a javascript application.
Thanks.
Upvotes: 2
Views: 10491
Reputation: 47677
You can use a mask plugin - DEMO
jQuery(function($){
$("input").mask("9?99.9?99.9?99.9?99", {placeholder:" "});
});
Upvotes: 4