class="expect_short current"></a><a href="javascript:void(0)"
class="expect_middle"></a><a href="javascript:void(0)"
class="expect_long"></a></span>
<div class="var_infobox">
<div class="varriable_table">
<table width="100%">
<thead>
<tr class="title" height="27" align="center">
<th height="27" width="130">变压器名称</th>
<th width="85">容量</th>
<th width="105">超载比例</th>
<th width="115">超载可能性</th>
<th> </th>
</tr>
</thead>
</table>
<div class="info_table" style="height:190px;">
<table width="100%">
<tbody>
<tr height="27" align="center" class="text">
<td width="130" height="27"><input type="button"
value="海盐变" οnclick="haiyanbian()" /></td>
<td width="85">600</td>
<td width="105">30%</td>
<td width="115">93%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text text_odd">
<td width="130" height="27">城北变</td>
<td width="85">600</td>
<td width="105">92%</td>
<td width="115">98%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text">
<td width="130" height="27">西区变</td>
<td width="85">600</td>
<td width="105">93%</td>
<td width="115">98%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text text_odd">
<td width="130" height="27">东区变</td>
<td width="85">600</td>
<td width="105">88%</td>
<td width="115">95%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text">
<td width="130" height="27">城北变</td>
<td width="85">600</td>
<td width="105">92%</td>
<td width="115">98%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text text_odd">
<td width="130" height="27">西区变</td>
<td width="85">600</td>
<td width="105">93%</td>
<td width="115">98%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text">
<td width="130" height="27">东区变</td>
<td width="85">600</td>
<td width="105">88%</td>
<td width="115">95%</td>
<td> </td>
</tr>
<tr height="27" align="center" class="text text_odd">
<td width="130" height="27">城北变</td>
<td width="85">600</td>
<td width="105">92%</td>
<td width="115">98%</td>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="varriable_table" style="display:none;">
<table width="100%">
<thead>
<tr class="title" height="27" align="center">
<th height="27" width="130">变压器名称</th>
<th width="85">容量</th>
<th width="105">超载比例</th>
<th width="115">超载可能性</th>
<th> </th>
</tr>
</thead>
</table>
<div class="info_table" style="height:190px;">
<table width="100%">
<tbody>
<tr height="27" align="center" class="text">
<td width="130" height="27">东区变</td>
<td width="85">600</td>
<td width="105">88%</td>
<td width="115">95%</td>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="varriable_table" style="display:none;">
<table width="100%">
<thead>
<tr class="title" height="27" align="center">
<th height="27" width="130">变压器名称</th>
<th width="85">容量</th>
<th width="105">超载比例</th>
<th width="115">超载可能性</th>
<th> </th>
</tr>
</thead>
</table>
<div class="info_table" style="height:190px;">
<table width="100%">
<tbody>
<tr height="27" align="center" class="text">
<td width="130" height="27">西区变</td>
<td width="85">600</td>
<td width="105">88%</td>
<td width="115">95%</td>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
然后 是 js代码的实现:
文件的名称为valiable.js
power.variable={
init:function(){
var v_ar=function(){};
v_var.protorype.manage=function(element,direct,num){
var that=$(this);
var index=$(this).index();
for(vat i=0;i<num;i++){
(funciton(_i){
if(direct==="next"){
if(i===index){ that.partent().next.children().eq(_i).show();}else{ that.partent().next.children().eq(_i).hide()l}
}else{
f(i===index){ that.partent().next.children().eq(_i).show();}else{ that.partent().next.children().eq(_i).hide()l}
}
})(i);
}
}
var list=new v_ar();
list.manage($(".f_l>a"),"next",3);
}
}
power.varialbe.init();