一:登陆页面
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>test</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT type=text/javascript>
/*
此方法用于程序中动态请求JS,并且浏览器可以缓存,以后不必再请求
*/
document.include = function (jsSrc,jsName,onLoadComplete,onLoadError) {
var head = document.getElementsByTagName("head")[0];
var scripts = head.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
var src = scripts[i].src;
src=src.substr(src.lastIndexOf('/')+1);
if (src == jsSrc) {
return false;
}
}
var script = document.createElement("script");
script.language = "javascript";
script.id = jsName;
script.src = jsSrc;
script.defer = true;
script.onload=onLoadComplete;
script.onreadystatechange=function(){
if(this.readyState=="loaded"||this.readyState=="complete"){
onLoadComplete();
}
};
script.onerror=onLoadError;
head.appendChild(script);
return true;
}
/**
* 如何操作cookie
* 本类是用来封装操作cookie的方法
*/
var cookie=new Object();
// 读方法
cookie.getCookie=function(cookieName,defaultValue){
var lowerCookieName = cookieName.toLowerCase();
var cookieStr = document.cookie;
if (cookieStr == "")
{
return defaultValue;
}
var cookieArr = cookieStr.split("; ");
var pos = -1;
for (var i=0; i<cookieArr.length; i++)
{
pos = cookieArr[i].indexOf("=");
if (pos > 0)
{
if (cookieArr[i].substring(0, pos).toLowerCase() == lowerCookieName)
{
return decodeURIComponent(cookieArr[i].substring(pos+1, cookieArr[i].length));
}
}
}
return defaultValue;
}
// 写方法
cookie.writeCookie=function(cookieName, cookieValue, expires){
if (expires)
{ //指定了 expires
document.cookie = cookieName + "=" + encodeURIComponent(cookieValue) + "; expires=" + expires.toGMTString();
}
else
{
document.cookie = cookieName + "=" + encodeURIComponent(cookieValue);
}
}
/**
* cookie缓存对象
* 本类是用来封装一个在cookie中缓存的一个用户对象,该对象的字段都应该被缓存到cookie中,而且可以从cookie中读取以创建此对象
* 需要cookie类来支持cookie的操作
*/
userModel=function(){
var model=new Object();
this.get=function(name){
model[name]=cookie.getCookie(name,model[name]);
return model[name];
};
this.set=function(name,value){
if(!(model[name]==undefined))
{
model[name]=value;
cookie.writeCookie(name, value, null);
};
}
}
/*===================================入口================================================*/
function indexInit(){
// 自己根据ajax来得到要执行那句
if(false)
{
document.getElementById("layer").style.display="none";
}
}
</SCRIPT>
</HEAD>
<BODY onload=indexInit()>
<STYLE>
DIV.layer1 {
Z-INDEX: 10; LEFT: 0px; WIDTH: 100%; POSITION: absolute; TOP: 0px; TOP: expression(documentElement.scrollTop); HEIGHT: 100%
}
</STYLE>
<!--***************************************提示层********************************************-->
<DIV id=layer>
<!--遮蔽层1-->
<DIV class=layer1 style="FILTER: alpha(opacity = 80); BACKGROUND-COLOR: #111111; moz-opacity: 0.8; opacity: 0.8">
<TABLE align=center name="btnTable">
<TBODY>
<TR><TD COLSPAN="2"><SPAN STYLE="COLOR:RED">状态信息:页面载入中...</SPAN></TD></TR>
<TR>
<TD><INPUT style="WIDTH: 60px" type=button value=重试 name=retryBtn></TD>
<TD><INPUT style="WIDTH: 60px" type=button value=取消 name=cancelBtn></TD></TR></TBODY></TABLE>
</DIV>
</DIV>
<!--***************************************显示数据层********************************************-->
<DIV id=loginDiv>
<TABLE cellSpacing=0 cellPadding=0 width=900 align=center border=0><TBODY>
<TR vAlign=top>
<TD><BR>
<P class=redAndBold>重要通知:</P>
<IFRAME id=newsFrame
src="newslist.htm" frameBorder=0 width=450
scrolling=no height=400></IFRAME><BR></TD></TR></TBODY></TABLE>
</DIV>
</BODY></HTML>
二:登陆页面引入的文件:newslist.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0044)http://news.etest.edu.cn/JLPT/1/newslist.htm -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT type=text/javascript>
function openNew(htm,width,height){
window.open(htm,'detail','scrollbars=yes,resizable=yes,width='+width+',height='+height);
return false;
}
</SCRIPT>
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<TABLE cellPadding=5 width=400 border=0>
<TBODY>
<TR style="FONT-SIZE: 12px">
<TD width=29> </TD>
<TD width=800>
<UL style="LINE-HEIGHT: 180%">
<LI><A onclick="javascript:openNew('news2.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">2008年度日本语能力测试各考点领取准考证时间表
</A>( 2008-06-05 )
<LI><A onclick="javascript:openNew('news6.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">关于8月8日海外考试网上报名系统暂停电话人工服务的通知</A>(
2008-08-06 ) <IMG src="newslist.files/new.gif" border=0>
<LI><A onclick="javascript:openNew('news0.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">关于日本语能力测试报名截止时间及剩余名额释放的通知</A>(
2008-07-07 )
<LI><A onclick="javascript:openNew('news1.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">关于定时释放日本语能力测试空余考位的通知
</A>( 2008-06-11 )
<LI><A onclick="javascript:openNew('news3.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">2008年度日本语能力测试网上报名通知
</A>( 2008-05-30 )
<LI><A onclick="javascript:openNew('news4.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">2009年起日本语能力测试将一年实施两次考试
</A>( 2008-05-16 )
<LI><A onclick="javascript:openNew('news5.htm',640,550);"
href="http://news.etest.edu.cn/JLPT/1/newslist.htm#">关于国家法定节假日期间暂停海外考试报名咨询电话人工服务的通知
</A>( 2008-03-25 ) </LI></UL></TD></TR></TBODY></TABLE></BODY></HTML>