![]() |
how to use HTML to add "-" to fix in input box?
Hi everyone..how to make the input text box with "-" ?
like the text box is look like " - " before the dash is 4 size, after the dash is 10 size. whatever user key in 6 digits, it will become like this "1234-56" how to make it like this in HTML? |
Re: how to use HTML to add "-" to fix in input box?
First, what is this input used for?
if it is for a verification or something like this, I think you can make two text box with limited length of input. If you just want to use 1 text box, you must use javascript (I think). Coz as far as I know, HTML is just used for designing website, it's not a programming language. HTML -> HyperText Markup Language |
Re: how to use HTML to add "-" to fix in input box?
Thankx for ur reply
the input box, use for key in only..... so, i have to create to input box?? [input with length 4] - [input with lenght 2] <--- is it like this? |
Re: how to use HTML to add "-" to fix in input box?
Here is some javascript I use to make it so that the user can only enter numbers:
Code:
<script type="text/javascript">Maybe you can change the code to suit your goal?? I think. |
Re: how to use HTML to add "-" to fix in input box?
Quote:
yeah, that's what I mean (if you don't want to use javascript). But if you want to use javascript, maybe you can try SpOonWiZaRd code |
Re: how to use HTML to add "-" to fix in input box?
Thank you very much!!!! ok... i know how to do now...
xie xie |
Re: how to use HTML to add "-" to fix in input box?
Here is also a link to a page that does it in a very cool way, look at where you have to enter your number. http://www.vuzu.tv/register/
|
| All times are GMT +5.5. The time now is 11:54. |