第三周实习记

这一周似乎过得去,总算做了点事情。星期二早上,我早早就去到实验室,等老师开门。结果用了一个上午加半个下午,终于用扫描仪扫完了我的任务。老师要我们做电子书,从扫描文字到图形到做成网页,都没有多少难度可言。但是,无聊反复的动作很多,做起来还真烦。何况文字扫描并不是全部都正确地被识别,不得不手动输入,还有数学公式也要手动输入,图形扫描后也还是要作小量修改的。老师说这是考我们的耐心、细心及工作态度。我只好认命。

不可否认,我的形象思维不及逻辑思维。所以,我不太懂用Photoshop处理图像。所以我做网页的时候不用DreamWare软件,而用文本编辑工具。做树形菜单的时候,我直接到论坛偷一点代码,然后稍作更改。因为书的目录只分章、节两级,所以偷了一个最简单的JS代码。

<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html  xmlns ="http://www.w3.org/1999/xhtml" >
< head >
< meta  http-equiv ="Content-Type"  content ="text/html; charset=gb2312"   />
< title > 生产实习 </ title >
< style  type ="text/css" >
<!--
body 
{
    background-color
: #017BAC;
    margin
: 0px;
}

body,td,th 
{
    font-family
: Verdana;
    font-size
: 12px;
    color
: #FFFFFF;
}

a:link 
{
    text-decoration
: none;
    color
: #FFFFFF;
}

a:visited 
{
    text-decoration
: none;
    color
: #FFFFFF;
}

a:hover 
{
    text-decoration
: underline;
    color
: #FF0000;
    cursor
: pointer;
}

a:active 
{
    text-decoration
: none;
}

#MAIN 
{
    width
: 100%;
    overflow
: hidden;
}

#TITLE 
{
    width
: 100%;
    line-height
: 20px;
    cursor
: pointer;
}


#TITLE img 
{
    border
: 0px;
    height
: 16px;
    width
: 19px;
}

#LISTS 
{
    width
: 100%;
    margin
: 0px;
    display
: none;
}

#LISTS li 
{
    width
: 100%;
    line-height
: 18px;
    padding-left
: 20px;
    list-style-type
: none;
}

-->
</ style >
< script  language ="JavaScript"  type ="text/javascript" >

    
var plus=new Image();
    plus.src
="images/plus.png";
    
var minus=new Image();
    minus.src
="images/minus.png";
function imageInit()
{

}

function lightlist(obj)
{
    
if(obj.style.backgroundColor == "")
    
{
        obj.style.backgroundColor 
= "#FFFFFF";
        obj.style.color 
= "#000000";
    }

    
else
    
{
        obj.style.backgroundColor 
= "";
        obj.style.color 
= "";
    }

}


function unfurl(num,url)
{
    titleobjs 
= document.getElementsByName("TITLE");
    listobjs 
= document.getElementsByName("LISTS");
    imgobjs 
= document.getElementsByName("IMAGES");
    
    
if(listobjs[num].style.display != "block")
    
{
        
for(i=0;i<listobjs.length;i++)
        
{
            
if(i == num)
            
{
                
if(url != undefined)
                
{
                    top.document.all.main.src 
= url;
                }

                
else
                
{
                    listobjs[i].style.display 
= "block";
                }

                imgobjs[i].src 
=minus.src;
                titleobjs[i].style.backgroundColor 
= "#019DC4";
            }

            
else
            
{
                listobjs[i].style.display 
= "none";
                titleobjs[i].style.backgroundColor 
= "";
                imgobjs[i].src 
=plus.src;
            }

        }

    }
else
    
{
        listobjs[num].style.display 
= "none";
        imgobjs[num].src 
=plus.src;
    }


}

</ script >
</ head >
< body >
< div  id ="MAIN" >
  
< div  id ="TITLE"  onclick ="unfurl(0);"  style ="background-color: #019DC4;" >< img  id ="IMAGES"  src ="images/plus.png"   /> 第十章 热电式传感器 </ div >
  
< ul  id ="LISTS"  style ="display: none;" >
    
< href ="http://bbs.5qzone.net/thread.php?fid=2"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第一节 热电偶传感器
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=167"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第二节 热电阻传感器
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=3"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第三节 热敏电阻传感器
        
</ li >
    
</ a >
  
</ ul >
  
< div  id ="TITLE"  onclick ="unfurl(1);"  style ="background-color: #019DC4;" >< img  id ="IMAGES"  src ="images/plus.png"   /> 第十二章 半导体式物性传感器 </ div >
  
< ul  id ="LISTS"  style ="display: none;" >
    
< href ="http://bbs.5qzone.net/thread.php?fid=118"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第一节 气敏传感器 
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=138"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第二节 湿敏传感器
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=147"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第三节 磁敏传感器 
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=152"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第四节 色敏传感器 
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=12"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第五节 离子敏传感器
        
</ li >
    
</ a >
  
</ ul >
  
< div  id ="TITLE"  onclick ="unfurl(2);"  style ="background-color: #019DC4;" >< img  id ="IMAGES"  src ="images/plus.png"   /> 第十三章 传感器的标定 </ div >
  
< ul  id ="LISTS"  style ="display: none;" >
    
< href ="http://bbs.5qzone.net/thread.php?fid=111"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第一节 传感器的静态特性的标定方法
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=141"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第二节 传感器的动态特性的实验确定法
        
</ li >
    
</ a >
    
< href ="http://bbs.5qzone.net/thread.php?fid=120"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第三节 常用的标定设备
        
</ li >
    
</ a >< href ="http://bbs.5qzone.net/thread.php?fid=21"  target ="main" >
        
< li  onmouseover ="lightlist(this);"  onmouseout ="lightlist(this);" >
        第四节 传感器的标定举例
        
</ li >
    
</ a >
  
</ ul >
</ div >
</ body >
</ html >

树形菜单做好了,页面内容还要求有“上一页”、“下一页”这样的链接。由于是静态网页,这些相同功能还是要一个一个地设置超链接,觉得很费事。于是我又想到了这样一个办法。首先有一个这样的JS文件。

//  pre_next_page.js
var  t = this .document.title;
function  pre_next_page(chapter)
{
    
with (document)
    {
        writeln(
" <p align='right'><a href='chapter " + chapter + " _ " + (parseInt(t) - 1 ) + " .htm'>上一页</a> " );
        writeln(
" <a href='chapter " + chapter + " _ " + (parseInt(t) + 1 ) + " .htm'>下一页</a></p> " );
    }
}

然后在每个“内容页面”包含以下代码:

< title > 1 </ title >
< script  language ="javascript"  src ="../pre_next_page.js"   ></ script >

< script >
pre_next_page(
10 );
</ script >

以上代码中的“10”参数代表第十章,每个章节只要修改这个数字,其它完全一样。因为我的文件存放结构和命名规则是这样的:

│  commons.css
│  pre_next_page.js

├─chapter_10
│  │  chapter10_1.htm
│  │  chapter10_2.htm
├─chapter_11
│  │  chapter11_1.htm

考虑到第一节的“上一页”,我就特意写多一个文件叫“chapter×_0.htm”放在每章的目录里。此文件内容只有一句代码“<META HTTP-EQUIV="Refresh" CONTENT="0;URL=×.htm">”,用来跳转页面。

就这样,以“动态的思想”去做“静态的事情”。也许是多此一举,但这是唯一我可以做好的事,就这样做了。


 除了做点实事,我仍是一如既往地看电视。这次看的是新版的〈雪山飞狐〉,只看完了前面十集,才开始看到胡斐长大。这个片我小时候看过,现在都几乎忘记剧情,只记得几个人物的名字。书我也没看,所以这次想好好看看电视。这次看一定要小时候看有不同的感受,我看了这几集,竟然是这样想的。

看到胡一刀通过写信告诉苗人凤埋藏了几代人的秘密时,我首先想到的是:有些话一定要当面说清楚,其它任何手段都不可代替。

看到南兰教苗人凤如何向她求婚,我想:这也太快了吧?比现代人的快餐爱情还快。也许,她要嫁给他并不是因为爱情吧?!

看到苗人凤的老婆给田归农拐带,我想到两点:苗人凤只会骄纵夫人,尽量满足她的一切要求,但成日只会练武,不懂和夫人相处,以致两人都未感到幸福。田归农看到苗大哥的老婆靓(当然第二个原因是想得到那份有关宝藏的手札),极力讨好她,同时不惜破坏人家感情,并扮成一个君子。而蒙在鼓里的苗夫人竟付出了真爱。不知道当她知道真相后,那份爱会变成什么?

看到武功是“打遍天下无敌手”的苗大侠处处给田归农陷害,我想,武功再高也要有智谋才行,不然会给人卖了还帮着数钱。

继续看下去,会有更多感想,因为冰雪聪明的女主角就要出现了。期待中。。。。。。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值