【发布时间】:2009-02-13 07:11:00
【问题描述】:
我有一个包含 HTML 的用户控件,如下所示:
<table id="tblProgramInfo" runat="server" cellpadding="0" cellspacing="0" class="ProgramInfo">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%" class="tblProgram" abc="def">
<tr>
<td>
Some data
</td>
</tr>
</table>
</td>
</tr>
由于它是一个用户控件,它们可以是具有相同类“ProgramInfo”和“tblProgram”的多个表。现在,我使用 Jquery 为“ProgramInfo”类附加了 mouseover 和 mouseout 事件。我想要的是,在 mousemove 和 mouseout 上更改包含类“tblProgram”的内部表格的边框颜色。
我的 mousemove 和 mouseevent 是:
$(document).ready(function()
{
$(".ProgramInfo").mouseover(function()
{
// Code here?
});
$(".ProgramInfo").mouseout(function()
{
// Code here?
});
});
另外,我想通过JQuery改变上表的宽度和高度。当我尝试这个时,我得到了 width:auto。
【问题讨论】: