一个JavaScript做的状态栏条式的菜单,不能实现所有页的提交?请高手指教!(100分)

  • 主题发起人 主题发起人 BlueNight
  • 开始时间 开始时间
B

BlueNight

Unregistered / Unconfirmed
GUEST, unregistred user!
我找到了这个JavaScript特效,请看这个框架
http://go5.163.com/shuangxia01/wbtx/wbtx5/wbtx4.htm
我在它的每一页里添加了一个table,然后在所有table外包了一个form
想用一个submit提交form中各个table里所有东西
但问题出现在:当我在某一页(某一个table)里添入东西后,
如果进入其它页后,再返回这一页,这一页的东西没了(好像这一页是被重新载入的)
所以不能提交所有table里内容?
这个JavaScript的代码如下: (不知如何修改能使其它页的东西不丢)
<SCRIPT language=JavaScript>
//a public function that the container uses to pass in values for the labels
function public_Labels(label1, label2, label3, label4, label5, label6, label7){

t1.innerText = label1;

t2.innerText = label2;

t3.innerText = label3;

t4.innerText = label4;

t5.innerText = label5;

t6.innerText = label6;

t7.innerText = label7;

}

//a public function that the container uses to pass in values for the card containers
function public_Contents(contents1, contents2, contents3, contents4, contents5, contents6, contents7){

t1Contents.innerHTML = contents1;

t2Contents.innerHTML = contents2;

t3Contents.innerHTML = contents3;

t4Contents.innerHTML = contents4;

t5Contents.innerHTML = contents5;

t6Contents.innerHTML = contents6;

t7Contents.innerHTML = contents7;


init();

}

//sets the default display to tab 1
function init(){
tabContents.innerHTML = t1Contents.innerHTML;

}

//this is the tab switching function
var currentTab;

var tabBase;

var firstFlag = true;



function changeTabs(){

if(firstFlag == true){
currentTab = t1;

tabBase = t1base;

firstFlag = false;

}

if(window.event.srcElement.className == "tab"){

currentTab.className = "tab";


tabBase.style.backgroundColor = "white";


currentTab = window.event.srcElement;


tabBaseID = currentTab.id + "base";


tabContentID = currentTab.id + "Contents";


tabBase =do
cument.all(tabBaseID);


tabContent =do
cument.all(tabContentID);


currentTab.className = "selTab";


tabBase.style.backgroundColor = "";


tabContents.innerHTML = tabContent.innerHTML;


}
}


</SCRIPT>
 
tabContents.innerHTML = tabContent.innerHTML;

看这一句,每次切换都把原来的覆盖了。
 
后退
顶部