以密码格式掩盖所有在textarea中输入的文本,例如******** [英] mask all entered text in textarea in password format e.g. ********

查看:57
本文介绍了以密码格式掩盖所有在textarea中输入的文本,例如********的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<textarea id="txt_area" class="TextArea" name="textarea"  maxlength="256"></textarea>

at run time when user try to enter anything inside the above text area, it should display password format or special characters e.g.: *********

推荐答案

下面是一个小字体我试过的样品。这不是确切的解决方案,但可能有用。您可能需要注意几件事情

- 当用户输入字符时

- 当用户选择整个文本并输入

时 - 用户按退格键(全选并删除)

等..



Below is a small sample that i tried. This is not the exact solution but it might be useful. There are several things you might have to take care
- when user enters characters
- when user selects the whole text and enters
- when the user presses backspace (select all and delete)
etc. ..

<html>
    <head>
        <title></title>
    </head>
<body>
    <textarea id="txtArea" class="TextArea" name="textarea"  maxlength="256"></textarea>
    <input type="button" value="Get Value" />
<script type="text/javascript" src="../Scripts/jquery-1.7.1.js"></script>
<script type="text/javascript">


function


){
var text;


这篇关于以密码格式掩盖所有在textarea中输入的文本,例如********的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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