动态更改文本框的类型 [英] dynamically change the type of text box

查看:84
本文介绍了动态更改文本框的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类型为文本的html文本框,当它在页面中显示时,在某些情况下它应该是密码类型,因为它必须充当常规文本框。

解决方案

< blockquote>使用TextMode属性在不同的要求之间切换(虽然我个人的意见是永远不会有两个不同的用途)。



使用这个的示例和提示可以在



找到 http://stackoverflow.com/questions/7709243/initialize-textbox-with-the-password-textmode [ ^ ]







http://ryanfarley.com/blog/archive/2004/ 12/18 / 1300.aspx [ ^ ]




I have a html textbox of type text when its shown in page it should be of type password in some cases where as it must act as regular text box.

解决方案

Use the TextMode property to toggle between the different requirements (although my personal opinion is never to have anything with two distinct uses).

Examples and hints on using this can be found at

http://stackoverflow.com/questions/7709243/initialize-textbox-with-the-password-textmode[^]

and

http://ryanfarley.com/blog/archive/2004/12/18/1300.aspx[^]

amongst others


这篇关于动态更改文本框的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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