刷新|页面
refresh1.php新增后刷新显示:echo "";
exit;
refresh.ihtml
function tb_addnew(id1,t1,t2,t3) { 插入一条记录
var ls_t=document.all("table_add");
maxrow=ls_t.rows.length;
maxcell=ls_t.rows(0).cells.length;
mynewrow=ls_t.insertRow();
for (i=0; i
else if (i==1) t0=t1;
else if (i==2) t0=t2;
else if (i==3) t0=t3;
else if (i==4) t0="
";
else if (i==5) t0="";
mynewcell=mynewrow.insertCell();
//mynewcell.innerText=t0; //在
}
function tb_edit(sid) ...{
open_dialog('refresh1.php?action=edit&sid='+sid,'topic_edit','600','600');
}
function tb_view(sid) ...{
open_dialog('refresh1.php?action=view&sid='+sid,'topic_edit','600','600');
}
function tbrow_edit(sid,t1,t2,t3,t4) ...{
var ls_t=document.all("table_add");
maxrow=ls_t.rows.length;
for (i=0; i
ls_t.rows(i).cells(1).innerHTML=t1;
ls_t.rows(i).cells(2).innerHTML=t2;
ls_t.rows(i).cells(3).innerHTML=t3; //只需显示到修改的列
//ls_t.rows(i).cells(4).innerHTML=t4;
break;
}
}
}
function tb_delete(sid) ...{
if (confirm("确定要删除吗?")) ...{
open_dialog('refresh1.php?action=delete&sid='+sid,'topic_delete','600','400');
//var ls_t=document.all("table_add");
//ls_t.deleteRow();
}
}
function tbrow_delete(sid) ...{
var ls_t=document.all("table_add");
maxrow=ls_t.rows.length;
for (i=0; i
//window.alert(i);
ls_t.deleteRow(i);
break;
}
}
}
当需要两个刷新框架时,可写两次该代码,只是函数不用重名。