当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: <HTML><HEAD><title>俄罗斯方
 

 

 ·围格子    »显示摘要«
    摘要: 注释:放在<head>与</head>之间 <script>function showmenu(bmenu) {document.all.idfinder.style.display = (bmenu) ? "none" : "block" document.all.idmenu.style.display = (bmenu) ? "block" : "none"idml.classname ......
    摘要: asp3000 我这两天刚好完成了这样一个类似的系统,希望和大家探讨探讨jsp实现的技术。 新浪 sohu这样的系统应该是类似的,就是后台动态生成前台的html页面,不管后台用什么工具。 因为公司逼下来,要做这样的新闻系统,没有办法,连着做了两天,总算搞定了,很快就会发布到公司主页上面 当然我只做了一个后台管理的东西,用jsp+javabean来动态生成html文件 ......


js写的俄罗斯方块

<html>

<title>俄罗斯方块</title> 【程序编程相关:JAVA/JSP学习系列之十二

<head> 【推荐阅读:JAVA/JSP学习系列之十四

<!-- 【扩展信息:JAVA/JSP学习系列之十

<style>

body

{

}

.mb

{

    background-color: firebrick;

    cursor: default;

    height: 22px;

    width: 22px

}

.sb

{

    background-color: slategray;

    cursor: default;

    height: 22px;

    width: 22px

}

.bk

{

    background-color: white;

    cursor: default;

    height: 22px;

    width: 22px

}

.gt

{

    border-bottom: deepskyblue thin solid;

    border-left: deepskyblue thin solid;

    border-right: deepskyblue thin solid;

    border-top: deepskyblue thin solid;

    cursor: default

}

-->

</style>

<script>

<!--

var bx=new array(4);

var by=new array(4);

var px=new array(4);

var py=new array(4);

var mtimer

var firstview

function begingame()

{

    gamestate=0;

    speed=1;

    outtime=1100-speed*100;

    score=0;

    if(gamestate!=0)return;

    firstview=true;

    for(j=0;j<16;j++)

        for(i=0;i<10;i++)

            setclass(i,j,"bk");

    randbar();

    gamestate=1;

    play.disabled=true;

    window.clearinterval(mtimer);

    mtimer=window.setinterval("movebar()",outtime);

}

function keycontrol()

{

    if(gamestate!=1)return;

    switch(event.keycode){

        case 37:{    //left

            for(i=0;i<4;i++)if(bx[i]==0)return;

            for(i=0;i<4;i++)if(getclass(bx[i]-1,by[i])=="sb")return;

            for(i=0;i<4;i++)setclass(bx[i],by[i],"bk");

            for(i=0;i<4;i++)bx[i]=bx[i]-1;

            for(i=0;i<4;i++)setclass(bx[i],by[i],"mb");

            break;}

        case 38:{    //up

            var prembarx=new array(4);

            var prembary=new array(4);

            var cx=math.round((bx[0]+bx[1]+bx[2]+bx[3])/4);

            var cy=math.round((by[0]+by[1]+by[2]+by[3])/4);

            for(i=0;i<4;i++){

                prembarx[i]=math.round(cx-cy+by[i]);

                prembary[i]=math.round(cx+cy-bx[i]);

                if(prembarx[i]<0 ¦¦ prembarx[i]>9 ¦¦ prembary[i]<0 ¦¦ prembary[i]>15)return;

                if(getclass(prembarx[i],prembary[i])=="sb")return;

            }

            for(i=0;i<4;i++)setclass(bx[i],by[i],"bk");

            for(i=0;i<4;i++){

                bx[i]=prembarx[i];

    
...   下一页
 ·java servlet和jsp教程之八    »显示摘要«
    摘要: 8.1 http应答头概述    web服务器的http应答一般由以下几项构成:一个状态行,一个或多个应答头,一个空行,内容文档。设置http应答头往往和设置状态行中的状态代码结合起来。例如,有好几个表示“文档位置已经改变”的状态代码都伴随着一个location头,而401(unauthorized)状态代码则必须伴随一个www-authenticate头。    然而,即使在没有设置特殊含义的......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE