如何在文本框中制作光照或阴影文本 [英] how to make light or shadow text in textbox

查看:67
本文介绍了如何在文本框中制作光照或阴影文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请有人帮我说明如何在文本框上写一个浅色文字,当用户点击文本框时,文本隐藏

please can anybody help me that how to write a light text on textbox and when user click on the textbox it text hide

推荐答案

你有一个名为占位符用于输入控制。尝试为其设置值。当用户在文本框中输入任何文本而不是点击它时,浅色文本将消失。



选中此项: http://jsfiddle.net/LgfLqa0a/ [ ^ ]
You have a property called "placeholder" for input control. Try to set value to it. The light text will disappear when user enters any text in the textbox and not by clicking on it.

Check this: http://jsfiddle.net/LgfLqa0a/[^]


尝试以下代码:

Try below code:
<asp:textbox ID="txtName" runat="server" placeholder="Enter Name"></asp:textbox>



它使用HTML5的占位符属性。一旦用户专注于文本框输入名称将隐藏。



如果你想通过javascript手动实现它,请通过以下链接:

http://www.c -sharpcorner.com/Blogs/13860/how-to-set-watermark-in-Asp-Net-textbox.aspx [ ^ ]


这篇关于如何在文本框中制作光照或阴影文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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