1
我有以下的html:每当“输入”被聚焦时,改变`tr`风格?
<table id="TableNewUser" runat="server" width="50%" cellpadding="3" cellspacing="1"
border="0">
<tr>
<th colspan="2">
New User
</th>
</tr>
<tr>
<td width="50%" align="right">
<asp:TextBox ID="TextBoxUsername" runat="server" Style="direction: rtl;" MaxLength="25"></asp:TextBox>
</td>
<td align="left" width="50%">
UserName
</td>
</tr>
<tr>
<td align="right">
<asp:TextBox ID="TextBoxPass" runat="server" MaxLength="25"></asp:TextBox>
</td>
<td align="left">
Password :
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="ButtonSubmit" runat="server" Text="Submit" OnClick="ButtonSubmitClick" />
</td>
</tr>
</table>
我想改变tr
风格每当文本框的重点。
我已经使用了下面的CSS代码,但它不起作用。
input[type="text"]:focus tr
{
background-color: #e7e7e7;
}
你能指导我吗?
http://jquery.com/ – 2011-04-14 20:53:50
这是为什么downvoted?看起来像一个有效的问题。 – rockerest 2011-04-14 21:24:03
Upvoted因为这似乎是一个有效的问题,没有人给它一个downvoted的理由。 – 2011-04-14 21:26:36