My HTML:
<tr><td>Text</td><td><input type="text" value=""></td></tr>
My CSS:
input:focus tr{ background-color:#fff;}
在我撰写投入领域的文本时,我要强调一行。 我知道在“投入”之前是“减”的,但这样做是可能的。
Thanks a bunch
My HTML:
<tr><td>Text</td><td><input type="text" value=""></td></tr>
My CSS:
input:focus tr{ background-color:#fff;}
在我撰写投入领域的文本时,我要强调一行。 我知道在“投入”之前是“减”的,但这样做是可能的。
Thanks a bunch
可悲的是,无。 见。 CSS 在职儿童父母的选定人
http://jsfiddle.net
利用JQuery非常可能。 观察:
<><><><>>><>>>>><>>>>>>
<table border="1" cellpadding="20">
<tr>
<td>Text</td>
<td height="50" width="100" id="somename"><input type="text" value="" id="mirza"></td>
</tr>
<tr><td> </td><td> </td></tr>
<tr><td>a </td><td>1 </td></tr>
<tr><td>a </td><td>1 </td></tr>
<tr><td>a </td><td>1 </td></tr>
<tr><td>a </td><td>1 </td></tr>
<tr><td>a </td><td>1 </td></tr>
</table>
CSS
.highlightedRow { background-color: orange; }
Jquery
$( input ).focus(function() {
$(this).parent().parent().addClass( highlightedRow );
});
$( input ).blur(function() {
$(this).parent().parent().removeClass( highlightedRow );
});
令人痛心的是,没有办法将母子同心协力,因此你不得不使用 j。
This is good for when you are generating a lot of similar rows (looping through large datasets, etc): Script:
function rowSet(data_id){
document.getElementById( row_ + data_id).style.backgroundColor = blue ;
}
function rowReset(data_id){
document.getElementById( row_ + data_id).style.backgroundColor = ;
}
机构:
<body>
<form>
<table>
<tr id="row_#data_id#">
<td><input name="input1_#data_id#" onFocus="rowSet(#data_id#);" onBlur="rowReset(#data_id#);"></td>
<td><input name="input2_#data_id#" onFocus="rowSet(#data_id#);" onBlur="rowReset(#data_id#);"></td>
</tr>
</table>
</form>
</body>
你们也可以使用“目前”或你喜欢的任何东西。
这一分类法应当做到:
$( input ).focus(function() {
$( tr ).css("background-color", "#c00");
});
Demo rel=“nofollow>here
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.
selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...
How do you target specifically safari in css with styles?
Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...