请大家帮帮忙JSP问题

hcgi 2004-10-24 09:23:39
此代码只要一插入到表格
就显示
Internet Explorer 无法打开 Internet 站点file://路径名\文件名.htm

已终止操作

然后就是此页无法显示

请问怎样把它插入到表格中去?

万分感谢
万分感谢
万分感谢


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>.TreePoint {
BACKGROUND-IMAGE: url(img/point.gif); BACKGROUND-POSITION: left 0%; BACKGROUND-REPEAT: repeat-y; WIDTH: 22px
}
.TreeBgColor {
BACKGROUND-COLOR: #f1f1f1
}
.TreeSign {
CURSOR: hand; WIDTH: 22px
}
.ExplainON {
BACKGROUND-COLOR: #ffffff; COLOR: #000000; CURSOR: hand; FONT-FAMILY: Arial; FONT-SIZE: 9pt; MARGIN: 10%; TEXT-DECORATION: none; WHITE-SPACE: nowrap
}
.ExplainOFF {
COLOR: #000000; CURSOR: hand; FONT-FAMILY: Arial; FONT-SIZE: 9pt; MARGIN: 10%; TEXT-DECORATION: none; WHITE-SPACE: nowrap
}
</STYLE>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=#f1f1f1>
<SCRIPT>
//-------------有关图片-------------//
var TreeImg = new Array();

TreeImg[0] = new Image();
TreeImg[1] = new Image();
TreeImg[2] = new Image();

TreeImg[0].src = "open3.gif";
TreeImg[1].src = "close3.gif";
TreeImg[2].src = "line.gif";

//-------------制造菜单--------------------//
function MakeTree(newObj,oldObj,explain,num,title)
{
if(num==0)
{
pointClass = "";
}
if(num==1)
{
pointClass = "TreePoint";
}

if(title&&title!="")
{
title = ' title="'+title+'" '
}
else
{
title = ""
}

var word = '<table border="0" cellspacing="0" cellpadding="0" class="TreeBgColor">';

word+= '<tr>';
word+= '<td class="TreeSign">';
word+= '<img border="0" src="'+TreeImg[1].src+'" id="sign_'+newObj+'" onclick="SiblingClick()">'
word+= '</td>';
word+= '<td>'
word+= '<span class="ExplainOFF" onclick="TreeControl(this.value)" value="'+newObj+'" '+title+' ><nobr>'+explain+'</nobr></span>';
word+= '</td>';
word+= '</tr>';
word+= '<tr style="display: none" id="'+newObj+'">';
word+= '<td class="'+pointClass+'"> </td> ';
word+= '<td valign="top" width="54" id="td_'+newObj+'"></td>';
word+= '</tr>';

word+= '</table>';

eval(oldObj+".innerHTML+='"+ word +"'");

word = null;
}

//-------------制造连接--------------------//
function MakeLine(newObj,oldObj,explain,url,ltarget,title)
{

var the_target = "";

if(ltarget&<arget!="")
{
the_target += 'target="'+ltarget+'"';
}

if(title&&title!="")
{
title = ' title="'+title+'" '
}
else
{
title = ""
}

var word = '<table border="0" cellspacing="0" cellpadding="0" class="TreeBgColor">';

word+= '<tr>';
word+= '<td class="TreeSign">';
word+= '<a href="'+url+'" '+the_target+' ><img border="0" src="'+TreeImg[2].src+'"></a>'
word+= '</td>';
word+= '<td>'
word+= '<a href="'+url+'" '+the_target+title+' ><span class="ExplainOFF" onclick="LineControl(this.value)"><nobr>'+explain+'</nobr></span></a>';
word+= '</td>';
word+= '</tr>';
word+= '</table>';

eval(oldObj+".innerHTML+='"+ word +"'");

word = null;
}


//--------- 建立 菜单 框架 对象 ----------//

function GoodTree(objName)
{
this.id = "tree_"+objName;
this.obj = objName;
this.length = 0;

this.addTree = addTree;
this.addLine = addLine;

this.addEndTree = addEndTree;

this.endTree = endTree;

document.body.innerHTML += '<div id="stage_'+this.id+'" style="display: none"><table border="0" cellspacing="0" cellpadding="0" class="TreeBgColor"><tr><td id="td_'+this.id+'"></td></tr></table></div>';
}

//-----------建立 子菜单 对象 ---------//

function SubTree(objName,objID)
{
this.obj = objName;
this.id = objID;

this.addTree = addTree;
this.addLine = addLine;

this.addEndTree = addEndTree;

this.length = 0;
}

//---------- 菜单 方法 addTree ------------//

function addTree(explain,title)
{
var subID = this.id + "_" + this.length;
var subObj = this.obj+"["+this.length+"]";

var oldID = "td_"+ this.id;

eval(subObj+"= new SubTree('"+subObj+"','"+subID+"')");

MakeTree(subID,oldID,explain,1,title);

this.length++;

}

//---------- 菜单 方法 addEndTree ------------//

function addEndTree(explain,title)
{

var subID = this.id + "_" + this.length;
var subObj = this.obj+"["+this.length+"]";

var oldID = "td_"+ this.id;

eval(subObj+"= new SubTree('"+subObj+"','"+subID+"')");

MakeTree(subID,oldID,explain,0,title);

this.length++;
}

//----------- 菜单 方法 addLine -----------//

function addLine(explain,url,target,title)
{
var subID = this.id + "_" + this.length;
var oldID = "td_"+ this.id;

MakeLine(subID,oldID,explain,url,target,title);

this.length++;
}


//--------- 完成 菜单 和 消去 变量和 源蓝图 并且输出 -------------//

function endTree(place)
{

var the_stage = eval("stage_"+ this.id);
var obj = eval(place);

obj.innerHTML += the_stage.innerHTML;

document.getElementById("stage_"+ this.id).outerHTML ="";

eval(this.obj+"=null");

}

//-----------菜单的 隐藏 和显示 ------------//

var temp_tree_index = null; //纪录点击的TD的 sourceIndex

function TreeControl(obj)
{
var tr_obj = eval(obj);
var sign_obj = eval("sign_"+obj);

if(temp_tree_index)
{
document.all(temp_tree_index).className = "ExplainOFF"
}

event.srcElement.className = "ExplainON";

temp_tree_index = event.srcElement.sourceIndex;

if(tr_obj.style.display=="none")
{
tr_obj.style.display = "block";
sign_obj.src = TreeImg[0].src;

return;
}
if(tr_obj.style.display=="block")
{
tr_obj.style.display = "none";
sign_obj.src = TreeImg[1].src;

return;
}

}

//-----------Line的 方法 ------------//


function LineControl()
{
if(temp_tree_index)
{
document.all(temp_tree_index).className = "ExplainOFF"
}

event.srcElement.className = "ExplainON";

temp_tree_index = event.srcElement.sourceIndex;
}


//------------Sign TD的方法----------------//
function SiblingClick()
{
event.srcElement.parentElement.nextSibling.firstChild.click();
}



//--------------下面是 应用 例子 ----------------//


var One = new GoodTree("One"); //建立 一个菜单 One

One.addTree("One_0","我是菜单"); //插入 显示为 One_0 的菜单 同时生成 One[0] 下级菜单 对象

One[0].addTree("One_0_0","我是菜单"); //下级菜单One[0] 插入 菜单 One_0_0 同时生成 One[0][0]
One[0][0].addEndTree("One_0_0_0","我是菜单");
One[0][0][0].addLine("One_0_0_0","javascript:;","","我是连接");

One[0].addTree("One_0_1"); // One[0] 插入 菜单 One_0_1 同时生成 One[0][1];
One[0][1].addLine("One_0_1_0","javascript:;"); //One[0][1] 插入连接 One_0_1_0 路径:javascript:; 不输入target

One[0].addEndTree("One_O_2");
One[0][2].addEndTree("One_0_2_0");
One[0][2][0].addLine("One_0_2_0","javascript:;");

One.addTree("One_1"); //输入无点 菜单 One_1
One[1].addTree("One_1_0");
One[1][0].addLine("One_1_0_0","javascript:;");

One[1].addLine("One_1_1","####","_blank");
One[1].addTree("One_1_2");
One[1][2].addLine("One_1_2_0","javascript:;");
One[1].addLine("One_1_3","javascript:;");

One.addLine("One_2","javascript:;","_self");

One.endTree("document.body");
</SCRIPT>
</BODY></HTML>
...全文
26 点赞 收藏 回复
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复

还没有回复,快来抢沙发~

发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告