动态更改文本框的类型

编程入门 行业动态 更新时间:2024-10-24 14:20:02
本文介绍了动态更改文本框的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

解决方案

使用TextMode属性在不同的要求之间切换(虽然我个人的意见是永远不会有两个不同的用途)。 使用这个的示例和提示可以在 找到 stackoverflow/questions/7709243/initialize-textbox-with-the-password-textmode [ ^ ] 和 ryanfarley/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 stackoverflow/questions/7709243/initialize-textbox-with-the-password-textmode[^] and ryanfarley/blog/archive/2004/12/18/1300.aspx[^] amongst others

更多推荐

动态更改文本框的类型

本文发布于:2023-11-03 16:07:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555530.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本框   类型   动态

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!