<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#box,#box2,#box3,#box4{padding:10px;border:1px solid green;}
</style>
<script type="text/javascript">
//===========================点击展开关闭效果====================================
function openShutManager(oSourceObj,oTargetObj,shutAble,oOpenTip,oShutTip){
var sourceObj = typeof oSourceObj == "string" ? document.getElementByIdx_x(oSourceObj) : oSourceObj;
var targetObj = typeof oTargetObj == "string" ? document.getElementByIdx_x(oTargetObj) : oTargetObj;
var openTip = oOpenTip || "";
var shutTip = oShutTip || "";
if(targetObj.style.display!="none"){
} else {
}
}
</script>
<title>无标题文档</title>
</head>
<body>
<p><a href="###" οnclick="openShutManager(this,'box')">点击展开</a></p>
<p id="box" style="display:none">
</p>
<p><a href="###" οnclick="openShutManager(this,'box2',true)">点击展开</a></p>
<p id="box2" style="display:none">
</p>
<p><a href="###" οnclick="openShutManager(this,'box3',false,'点击关闭','点击展开')">点击展开</a></p>
<p id="box3" style="display:none">
</p>
<p><button οnclick="openShutManager(this,'box4',false,'点击关闭','点击展开')">点击展开</button></p>
<p id="box4" style="display:none">
</p>
</body>
</html>
------------------------------------------------------------------------------------------------
oSourceObj:点击事件的对象,类型为DOM对象,或者对象的id;
oTargetObj:展开关闭的对象,类型为DOM对象,或者对象的id;
shutAble:对象是否可关闭,类型为布尔值,可选,默认为false;
oOpenTip:对象关闭时,点击源的文字,类型为String,可选;
oShutTip:对象打开时,点击源的文字,类型为String,可选.