这个js 在同一个 页面 怎么实现 多次 调用
<!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>排名效果,alixixi整理收集</title>
<script type="text/javascript">
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
if (i == Num)
{
thisObj.className = "active";
document.getElementById(tabObj+"_Content"+i).style.display = "block";
}else{
tabList[i].className = "normal";
document.getElementById(tabObj+"_Content"+i).style.display = "none";
}
}
}
var show_king_id = 1;
function show_king_list(e,k)
{
if(show_king_id == k) return true;
o = document.getElementById("a"+show_king_id);
o.className = "bg";
e.className = " ";
show_king_id = k;
}
var show_kinga_id = 1;
function show_kinga_list(f,l)
{
if(show_kinga_id == l) return true;
o = document.getElementById("b"+show_kinga_id);
o.className = "bg";
f.className = " ";
show_kinga_id = l;
}
</script> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>排名效果,alixixi整理收集</title>
<script type="text/javascript">
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
if (i == Num)
{
thisObj.className = "active";
document.getElementById(tabObj+"_Content"+i).style.display = "block";
}else{
tabList[i].className = "normal";
document.getElementById(tabObj+"_Content"+i).style.display = "none";
}
}
}
var show_king_id = 1;
function show_king_list(e,k)
{
if(show_king_id == k) return true;
o = document.getElementById("a"+show_king_id);
o.className = "bg";
e.className = " ";
show_king_id = k;
}
var show_kinga_id = 1;
function show_kinga_list(f,l)
{
if(show_kinga_id == l) return true;
o = document.getElementById("b"+show_kinga_id);
o.className = "bg";
f.className = " ";
show_kinga_id = l;
}
</script> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询