JavaScript method code:
// Set the FieldSet height method, support IE browser and Firefox
// Parameter 1: pTableID, FieldSet internal div or table id
// Parameter 2: pFieldSetID, FieldSet ID
// Parameter 3: pImageID, image ID, image SRC updated after expansion or shrink
function FieldSetVisual( pTableID, pFieldSetID, pImageID )
{
var objTable = ( pTableID ) ;
var objFieldSet = ( pFieldSetID) ;
var objImage = ( pImageID) ;
if( == 'visible' )
{
= 'hidden' ;
= "22px" ;
="images/" ;
}
else
{
= 'visible';
var heightFieldSet = parseInt( (0,-2)) ;
var heightTable = parseInt( ) ;
= heightFieldSet + heightTable + "px" ;
="images/" ;
}
}
FieldSet code in HTML:
<fieldset >
<legend>
<img alt="Expand or shrink" src="images/" src="images/" onclick="FieldSetVisual('t_ShipInportInfo','fset_ShipInportInfo','img_ShipInportInfo')" />Car and ship arrival record<span style="color: Red;" style="color: Red;"> (Input/Not entered)</span></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
style="visibility: visible;" style="visibility: visible;">
<tr>
<td>
Car and ship name: <span style="font-weight: bold;" style="font-weight: bold;">Car and other 50 sections</span>
</td>
<td>
Arrival time: May 9, 2009 at 17:00
</td>
<td>
How to get coal: <span style="font-weight: bold;" style="font-weight: bold;">Railway</span>
</td>
<td>
Source of coal: <span style="font-weight: bold;" style="font-weight: bold;">Huainan</span>
</td>
</tr>
</tr>
</table>
</fieldset>
Copy the codeThe code is as follows:
// Set the FieldSet height method, support IE browser and Firefox
// Parameter 1: pTableID, FieldSet internal div or table id
// Parameter 2: pFieldSetID, FieldSet ID
// Parameter 3: pImageID, image ID, image SRC updated after expansion or shrink
function FieldSetVisual( pTableID, pFieldSetID, pImageID )
{
var objTable = ( pTableID ) ;
var objFieldSet = ( pFieldSetID) ;
var objImage = ( pImageID) ;
if( == 'visible' )
{
= 'hidden' ;
= "22px" ;
="images/" ;
}
else
{
= 'visible';
var heightFieldSet = parseInt( (0,-2)) ;
var heightTable = parseInt( ) ;
= heightFieldSet + heightTable + "px" ;
="images/" ;
}
}
FieldSet code in HTML:
Copy the codeThe code is as follows:
<fieldset >
<legend>
<img alt="Expand or shrink" src="images/" src="images/" onclick="FieldSetVisual('t_ShipInportInfo','fset_ShipInportInfo','img_ShipInportInfo')" />Car and ship arrival record<span style="color: Red;" style="color: Red;"> (Input/Not entered)</span></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
style="visibility: visible;" style="visibility: visible;">
<tr>
<td>
Car and ship name: <span style="font-weight: bold;" style="font-weight: bold;">Car and other 50 sections</span>
</td>
<td>
Arrival time: May 9, 2009 at 17:00
</td>
<td>
How to get coal: <span style="font-weight: bold;" style="font-weight: bold;">Railway</span>
</td>
<td>
Source of coal: <span style="font-weight: bold;" style="font-weight: bold;">Huainan</span>
</td>
</tr>
</tr>
</table>
</fieldset>