退出文本框后插入一些符号 [英] Insert some symbols after exit the Textbox
本文介绍了退出文本框后插入一些符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
输入要在运行时添加一些符号的值后,我在网页中放置了一个文本框.例如..我在退出要显示为**********的文本框后输入Hello * Hello ******,我该怎么办?任何人都可以请我指导.
谢谢..
Thiygu
Hi every one,
I have place one textbox in my webpage after enter the value i want add some symbols at run time. Ex..I enter Hello after exit the textbox i want show like ******* Hello****** how can i do it? Any one knows pls guide me.
Thanks..
Thiygu
推荐答案
我尝试了一些代码来检查它...
Hi,
I tried some code for it check it...
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script language="javascript" >
function chng() {
document.getElementById("txtname").value = "*********" + document.getElementById("txtname").value + "*******";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type ="text" id="txtname" onfocusout="chng()" />
</div>
</form>
</body>
</html>
在这里我使用了javascript
希望我的提问对您有帮助.
最好的
Here I used javascript
I hope my quess is right in your question.
All the Best
这篇关于退出文本框后插入一些符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文