📄 mywlhead.js
字号:
imgsrc = CellBtnImgPath+CellBtns[I].Img;
if(I == CurPageIndex){
re = /n.gif/;
imgsrc=imgsrc.replace(re,'c.gif');
}
document.write('<img id=\"img',CellBtns[I].ImgId,'\" border=\"0\" src=\"',imgsrc,'\"\r\n');
document.write('alt=\"',CellBtns[I].Alt,'\" align=\"absmiddle\" width=\"20\" height=\"20\">');
if(I == CurPageIndex)
{
document.write('<font color=\"',CurPageFtColor,'\">');
}
document.write(CellBtns[I].Text,'</a></td>\r\n');
document.write('<!-- ================== -->\r\n');
}
//输出所有CellBtn
function OutputCellBtns()
{
for(I=0;I<CellBtnCount;I++)
OutputACellBtn(I);
//输出修饰列(同时也用于占位)
document.write('<td width=36 align=\"right\" height=\"20\" rowspan=\"1\"');
document.write('class = \"menucell\" bgcolor= ',UnSelectBkColor, ' >');
document.write('<img align=\"absmiddle\" border=0 src=\" ', CellBtnImgPath+'whitespace.gif', '\" width=\"26\" height=\"22\">');
document.write('</td>\r\n');
}
//输出时间和问候:
function OuputDateTimeHello()
{
Now = new Date();
WeekStr = new Array(7);
WeekStr[0] = '日';
WeekStr[1] = '一';
WeekStr[2] = '二';
WeekStr[3] = '三';
WeekStr[4] = '四';
WeekStr[5] = '五';
WeekStr[6] = '六';
document.write('<font color=\"black\" style=\"font-size:9pt\">');
document.write(Now.getYear(),'年',eval(Now.getMonth())+1,'月',Now.getDate(),'日,星期',WeekStr[eval(Now.getDay())],',',Now.getHours(),':',Now.getMinutes());
document.write('</font>');
odth_h = eval(Now.getHours());
odttmr = Math.floor(odth_h / 4);
var odthellostr;
switch(odttmr)
{
case 0 :
odthellostr = '半夜三更的......';break; //0-3
case 1 :
odthellostr = '起得好早!唔,找到虫子吃了吗?'; break;//4-7
case 2 :
odthellostr = '早上好啊!不用上班吗?';break; //8-11
case 3 :
odthellostr = '中午好!犯困吗?到我的个人天地瞧瞧去!';break; //12-15
case 4 :
odthellostr = '快下班了,别忘下载今天的课程啊'; break;//16-19
case 5 :
{
if(odth_h<22)
odthellostr = '晚饭吃的啥?到问答区提个问题吧'; //20-21
else
odthellostr = odthellostr = '夜已深,站长可能已出洞,找他吗?'; //22-23
}
}
//document.write('<font color=\"#000000\" style=\"font-size:9pt\">',' ',odthellostr,'</font>');
status = odthellostr;
}
//默认的广告:学习编程好轻松
var MainAds = '';
var MainAdsSeted = false; //广告是否改变?
function SetMainAds(ads)
{
MainAds = ads;
MainAdsSeted = true;
}
//页面说明:
var PageReadme = '';
function SetPageReadme(readme)
{
PageReadme = readme;
}
//打开地图:
function OpenWebMap()
{
ff = CellBtnObjPath + "webmap.htm";
window.open(ff,"subWindow","width=280,height=200,toolbar=0,statu=0,location=0,menubar=0");
}
function OutputMYWLHead()
{
//页面说明:
if(PageReadme.length == 0){
PageReadme = '<p style="line-height: 149%"><font color="#000000"> \r\n'
+'这里是一个面向编程初学者的园地,无论'
+'您有无基础,也无论您工作是什么,只要'
+'您有兴趣这样的创造:把自已的创意通过'
+'一行行代码,让计算机一五一十地执行 …'
+'…好极了,编程摇篮是您学习编程的第一站!</font></p>';
}
//默认的广告:学习编程好轻松
if(MainAdsSeted && MainAds.length == 0){
MainAds ='<p><font face=\"楷体_GB2312\" style=\"font-size:28pt\">学习编程好轻松!</font><img border=\"0\" src=\"' +
CellBtnImgPath + 'COFICUP.GIF\" align=\"absmiddle\" width=\"53\" height=\"43\">';
}
//新广告:今年暑假不上网,上网只为学编程:
// 这是广告最大尺寸:height="60" width="468"
else if(!MainAdsSeted){
MainAds ='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="ShockwaveFlash1" width="468" height="60">\n'
+'<param name="_cx" value="10001">\n'
+'<param name="_cy" value="1376">\n'
+'<param name="Movie" value="' + CellBtnObjPath + 'ads/baoming1.swf">\n'
+'<param name="Src" value="' + CellBtnObjPath + 'ads/baoming1.swf">\n'
+'<param name="WMode" value="Window">\n'
+'<param name="Play" value="-1">\n'
+'<param name="Loop" value="-1">\n'
+'<param name="Quality" value="High">\n'
+'<param name="SAlign" value>\n'
+'<param name="Menu" value="-1">\n'
+'<param name="Base" value>\n'
+'<param name="Scale" value="ShowAll">\n'
+'<param name="DeviceFont" value="0">\n'
+'<param name="EmbedMovie" value="0">\n'
+'<param name="BGColor" value>\n'
+'<param name="SWRemote" value>\n'
+'<param name="Stacking" value="below">\n'
+'</object>\n';
}
document.write('<center>');
document.write('<table border="0" width="760" height="218" cellspacing="0" cellpadding="0">\r\n');
document.write('<tr>\r\n');
document.write('<td width="146" height="21">\r\n');
document.write('<p id="glowtext" align="center"><a name="页首">没有弯路,编程摇篮</a></p>\r\n');
document.write('</td>\r\n');
document.write('<td height="21" colspan="2" width="466">\r\n');
document.write('<table border="0" width="100%" height="13" cellspacing="1">\r\n');
document.write('<tr>\r\n');
document.write('<td width="77%" height="7"> ');
OuputDateTimeHello();
document.write('</td>\r\n');
document.write('<td width="23%" height="7">\r\n');
document.write('<p align="center" style="margin: 0"> </td>\r\n');
document.write('</tr>\r\n');
document.write('</table>\r\n');
document.write('</td>\r\n');
document.write('<td height="21" width="180">\r\n');
//最后更新日期:
document.write('<p align="center"><span style="background-color: #FFFF00">更 新:',LastModifyDate,'</span></p>\r\n');
document.write('</td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="146" rowspan="2" height="119"><img border="0" src=\"');
document.write(CellBtnImgPath,'weblogo.gif\" width="145" height="108"></td>\r\n');
//document.write('\"></td>\r\n');
//本页主广告:
document.write('<td height="60" width="468" valign="top" >\r\n <center>');
document.write(MainAds);
document.write('</center></td>\r\n');
document.write('<td colspan="2" height="60" width="180">\r\n');
//设为首页:
document.write('<p align="center"><a id="menuhref" href="#" onclick=\"this.style.behavior=\'url(#default#homepage)\';');
document.write('this.setHomePage(\'',location.href,'\');\">设为首页</a></p>\r\n');
//加入收藏:
document.write('<p align="center"><a id="menuhref" href="#" onclick=\"this.style.behavior=\'url(#default#savefavorite)\';');
document.write('external.AddFavorite(\'',location.href,'\',\'',document.title,'\');\">加入收藏夹</p>\r\n');
//校园导航:
document.write('<p align="center"><a id="menuhref" href="#" onclick="OpenWebMap();return(false);">网站地图</a></p>');
document.write('</td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="610" height="59" colspan="3" background=\"');
//document.write(CellBtnImgPath,'gaozhi.gif\" valign="top">\r\n');
document.write('\"');
document.write(PageReadme);
document.write('</td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="758" height="18" colspan="4" valign="top" >\r\n');//bgcolor="#808080"
document.write('<p align="center"><font color="#c0c0c0" style="FONT-SIZE: 9pt">[建议:1、IE5.0以上版本 2、800*600或更高分辨率 3、允许使用Java脚本. 4、允许使用Cookies.5、F11键全屏浏览]</font></td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="758" height="7" colspan="4" valign="top"></td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="758" height="30" colspan="4" valign="top">\r\n');
document.write('<table border="0" width="100%" height="20" cellspacing="0" cellpadding="0">\r\n');
document.write('<tr>\r\n');
//输出本行所有单元格,每一格都是一个 "CellBtn"
OutputCellBtns();
document.write('</tr>\r\n');
//子页链接:
//----------------------------
document.write('<tr>\r\n');
document.write('<td width="758" height="18" colspan="12" bgcolor=\"',SelectBkColor,'\"#808080" class = \"submenucell\">\r\n');
OutputSubPage();
document.write('</td>\r\n');
document.write('</tr>\r\n');
//----------------------------
document.write('</table>\r\n');
document.write('</td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="758" height="18" colspan="4" valign="middle" align="center">\r\n'); //class="celltopline"
document.write('<marquee id="menu_hint" width="746" height="15" behavior="slide">轻轻松松入门,踏踏实实编程</marquee>\r\n');
document.write('</td>\r\n');
document.write('</tr>\r\n');
document.write('<tr>\r\n');
document.write('<td width="758" height="6" colspan="4" valign="top"></td>\r\n');
document.write('</tr>\r\n');
document.write('</table>\r\n');
document.write('</center>\r\n');
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -