JS不能在火狐下运行,但在谷歌和IE里没问题,请人帮忙改改!
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!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" />
<title></title>
<script type="text/javascript" language="javascript">
var count = 0;
var limit = new Array();
var countlimit = 1;
function expandIt(el) {
obj = eval("sub" + el);
if (obj.style.display == "none") {
obj.style.display = "block";
if (count < countlimit) {
limit[count] = el;
count++;
}
else {
eval("sub" + limit[0]).style.display = "none";
for (i = 0; i < limit.length - 1; i++) { limit[i] = limit[i + 1]; }
limit[limit.length - 1] = el;
}
}
else {
obj.style.display = "none";
var j;
for (i = 0; i < limit.length; i++) { if (limit[i] == el) j = i; }
for (i = j; i < limit.length - 1; i++) { limit[i] = limit[i + 1]; }
limit[limit.length - 1] = null;
count--;
}
}
</script>
</head>
<body>
<div id="main1" onclick="expandIt(1)">
<table width="170" height="24" border="0" cellpadding="0" cellspacing="0">
<tr style="cursor: hand;">
<td width="26"></td>
<td class="SystemLeft"> XXXXX </td>
</tr>
</table>
</div>
<div id="sub1" style="display: none">
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsSort.asp?Action=Add&ParentID=0" target="mainFrame" onclick='changeAdminFlag("XXXX")'> XXXXX</a></td>
</tr>
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsList.asp" target="mainFrame" onclick='changeAdminFlag("XXXXX")'>XXXXX</a></td>
</tr>
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsEdit.asp?Result=Add" target="mainFrame" onclick='changeAdminFlag("XXX")'> XXX</a></td>
</tr>
</table>
</div>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" language="javascript">
var count = 0;
var limit = new Array();
var countlimit = 1;
function expandIt(el) {
obj = eval("sub" + el);
if (obj.style.display == "none") {
obj.style.display = "block";
if (count < countlimit) {
limit[count] = el;
count++;
}
else {
eval("sub" + limit[0]).style.display = "none";
for (i = 0; i < limit.length - 1; i++) { limit[i] = limit[i + 1]; }
limit[limit.length - 1] = el;
}
}
else {
obj.style.display = "none";
var j;
for (i = 0; i < limit.length; i++) { if (limit[i] == el) j = i; }
for (i = j; i < limit.length - 1; i++) { limit[i] = limit[i + 1]; }
limit[limit.length - 1] = null;
count--;
}
}
</script>
</head>
<body>
<div id="main1" onclick="expandIt(1)">
<table width="170" height="24" border="0" cellpadding="0" cellspacing="0">
<tr style="cursor: hand;">
<td width="26"></td>
<td class="SystemLeft"> XXXXX </td>
</tr>
</table>
</div>
<div id="sub1" style="display: none">
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsSort.asp?Action=Add&ParentID=0" target="mainFrame" onclick='changeAdminFlag("XXXX")'> XXXXX</a></td>
</tr>
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsList.asp" target="mainFrame" onclick='changeAdminFlag("XXXXX")'>XXXXX</a></td>
</tr>
<tr>
<td width="36" height="22"></td>
<td class="SystemLeft"><a href="NewsEdit.asp?Result=Add" target="mainFrame" onclick='changeAdminFlag("XXX")'> XXX</a></td>
</tr>
</table>
</div>
</body>
</html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询