如何设置无法从文本框中删除国家/地区代码? [英] How do I set cannot delete the country code from textbox?

查看:76
本文介绍了如何设置无法从文本框中删除国家/地区代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发MVC 5,



从下拉列表中选择国家/地区后,获取国家/地区代码,然后在文本框中设置值,这样,

[ ^ ]



我尝试了什么:



那么,如何设置无法从文本框中删除的国家/地区代码,然后输入手机号码?

[ ^ ]



请帮帮我

解决方案

放区域co de在texbox之前,他们只需键入他们的号码,然后在后端你可以重新添加区号如果你需要。



<跨度> + 91 LT; /跨度> < input type = text name = phone /> 


检查这个 JSFiddle [ ^ ]

I am working on MVC 5,

After select country from dropdownlist, getting countrycode then set value in the textbox like this,
[^]

What I have tried:

then, how can I set the country code that can't be removed from the textbox, then enter mobile number?
[^]

Please help me

解决方案

Put the area code before the texbox so they just type their number in, then in the back-end you can re-add the area code if you need to.

<span>+91</span> <input type=text name=phone/>


check this JSFiddle[^]


这篇关于如何设置无法从文本框中删除国家/地区代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆