<li style="margin-top: 10px;">
<asp:TextBox ID="tbxVname" runat="server" Width="166" Height="13" onFocus="this.value='';"></asp:TextBox>
</li>
<li style="margin-top: 10px; margin-bottom: 10px;">
<asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
</li>有没什么方法在onFocus="this.value='';"里面加个颜色设置?类似onFocus="this.value='';this.color='red'"这样的
解决方案 »
- 项目在加载时出现这种状况……请教……
- 获取硬盘ID,如何区分获取的硬盘ID是否是装系统的硬盘。
- 请教个使用DirectX SDK开发视频播放功能的问题
- 对于DataSet的Adapter的一点疑惑
- 无法在指定的位置保存网页的程序怎么编写
- 求如何让网页根据文章内容自己自动生成关键字
- 一个小问题
- 博客的模板是怎么换的啊可以换多个主题,大家有没有做过的,能共享以下源吗,现在只有10分,以后再补
- 用Javscript制作图片变换特效从sql数据库提取图片路径的问题
- 我的VS.NET中C#编辑环境会自动换行,如何改回有左右滚动条?
- 如何通过MAC地址判断它的网络通信状态
- 求助,JQuery如何获取到该值,高手帮忙。
<head runat="server">
<title></title>
</head><body>
<form id="form1" runat="server">
<input type="text" onblur="this.style.color='red';this.value='你好!'" />
</form>
</body>
</html>
<input id="Text1" type="text" onfocus="this.style.color='red'" onblur="this.style.color='black'" />
为什么写到js 里面将一个css给这个事件的时候就显示不出来了呢??例如:<input id="Text1" type="text" onfocus="fnFocus()" onblur="this.style.color='black'" />
function fnFocus()
{
document.getelementById("Text1").className="aa";
}
<style type="css">
aa{ color:red;}
</style>
不知道各位试过没有,还是我写的有问题呀,
借楼主的机会也问一下下!!!
<input id="Text1" type="text" onfocus="fnFocus()" onblur="this.style.color='black'" />
function fnFocus()
{
document.getelementById("Text1").className="aa";
}
<style type="css">
.aa{ color:red;}
</style>回复5楼,是你的样式写的不对,你可以想想看我们在用class='aa'的时候,类别选择器应该是'.aa'吧