找到一种打开文件的方法,但这种方法使用了ActiveXObject.
还不是我最终想要的东西.这里只做参考.----------------------------------------------------
function htmlselect()
{
if (getOs()!='MSIE'){我要页面内容显示为 index1.html的内容,但URL内容不变.
要怎要写呢.
}else
{
var fso,f,file;
var ForReading=1;
fso =new ActiveXObject("Scripting.FileSystemObject");
file=fso.GetFile('index2.html');
f=fso.OpenTextFile('index2.html', ForReading);
document.body.innerHTML=f.Read(file.Size);
f.Close();
document.title="title name";
}
}
还不是我最终想要的东西.这里只做参考.----------------------------------------------------
function htmlselect()
{
if (getOs()!='MSIE'){我要页面内容显示为 index1.html的内容,但URL内容不变.
要怎要写呢.
}else
{
var fso,f,file;
var ForReading=1;
fso =new ActiveXObject("Scripting.FileSystemObject");
file=fso.GetFile('index2.html');
f=fso.OpenTextFile('index2.html', ForReading);
document.body.innerHTML=f.Read(file.Size);
f.Close();
document.title="title name";
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货