【www.gdgbn.com--js教程】

js小游戏,打网球效果代码


 


 

<script language="JavaScript">

var max=0;
var x=0;

var nl="rn";
function FrameList()
{
        max = FrameList.arguments.length;
        for(i=0;i }
function tick()
{
        document.animation.viewer.value = cartoon[x];
        x++;
        if(x==max) x=0;
        setTimeout("tick()", 200); 
}
cartoon = new FrameList(
" "+nl+
"         / "+nl+
"        / "+nl+
"      < "        |                                            o/|> "+nl+
"       /|                                              | "+nl+
"      / |                                              | "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"        / "+nl+
"       / "+nl+
"     < "       \                                             o/\ "+nl+
"       /\                                              / "+nl+
"      / /                                              \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"        / "+nl+
"       /                                              o "+nl+
"     < "+nl+
"       \                                              _\ "+nl+
"       /\                                            | / "+nl+
"      / /                                              \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"        / "+nl+
"       /                                              o "+nl+
"     < "       \                                              _\ "+nl+
"       /\                                            / / "+nl+
"      / /                                              \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"        / "+nl+
"       /                                           o "+nl+
"     < "       \                                              \  "+nl+
"       /\                                             /| "+nl+
"      / /                                            | \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"        / "+nl+
"       / "+nl+
"     < "       \                                             /\ "+nl+
"       /\                                             /| "+nl+
"      / /                                            | \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


" "+nl+
"        /"+nl+
"       / "+nl+
"     < "       \                                            /\  "+nl+
"       /\                                            /\__ "+nl+
"      / /                                            | "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"    \ "+nl+
"     \ "+nl+
"     < "       \                                         __O__ "+nl+
"       /\                                          / /\/ "+nl+
"      / /                                            | "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

    
" "+nl+
" "+nl+
" "+nl+
"  ___,_O                     .     .    .   .   .   O "+nl+
"       \      o   "    "                            /\ "+nl+
"       |\                                            /\ "+nl+
"      /  \                                           | \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


" "+nl+
" "+nl+
" "+nl+
"       O                     .     .    .   .   .   O_ "+nl+
"       \\____o    "    "                            /\ "+nl+
"       |\                                            /| "+nl+
"      /  \                                           | \ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


" "+nl+
"           /         o "+nl+
"          /       .  "+nl+
"       O>>     .                                    O_ "+nl+
"       \                                            /\ "+nl+
"       |\                                            /| "+nl+
"      /  \                                           || "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

"                         .   "   "  o  "+nl+ 
"           /         .               "+nl+
"          /       .  "+nl+
"       O>>     .                                      O"+nl+
"       \                                             /|\ "+nl+
"       |\                                            /| "+nl+
"      /  \                                           || "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


"                         .   "   "   "  ."+nl+
"                     .                     "  o"+nl+
"                  .                             "+nl+
"       O       .                                     _O/"+nl+
"      /|\                                             |"+nl+
"       |\|                                           //"+nl+
"      / ||                                           \\ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


"                         .   "   "   "  ."+nl+
"                     .                     "  ."+nl+
"                  .                              "  .  o"+nl+
"       O       .                                      _O/"+nl+
"      /|\                                              |"+nl+
"       |\|                                            //"+nl+
"       |/|                                            \\ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


"                         .   "   "   "  ."+nl+
"                     .                     "  ."+nl+
"                                                 "  ."+nl+
"       O                                             _O_o"+nl+
"      /|\                                              \ "+nl+
"     | |\                                             //"+nl+
"     | |/                                             \\ "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",


"                                 "   "  ."+nl+
"                                           "  ."+nl+
"                                                 "  ."+nl+
"       O                                              _O"+nl+
"      /|>                                              |\o "+nl+
"     / |\                                             /| "+nl+
"    /  |/                                             \| "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+   
"                                              ."+nl+
"                                                 "  ."+nl+
"       O                                               O"+nl+
"      /|>                                             /|\o "+nl+
"     / |\                                             /| "+nl+
"    /  |/                                             \| "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

 

" "+nl+
" "+nl+
" "+nl+
"       _O                                              O"+nl+
"      / |>                                            /|\o "+nl+
"     / /|                                             /| "+nl+
"      / |                                             \| "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"         /"+nl+
"        /"+nl+
"      < "        |                                            o/|> "+nl+
"       /|                                             /| "+nl+
"      / |                                             \| "+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",

" "+nl+
"         /"+nl+
"        /"+nl+
"      < "        |                                            o/|>"+nl+
"       /|                                              |"+nl+
"      / |                                              |"+nl+
"   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
);
tick();

</script>

本文来源:http://www.gdgbn.com/wangyezhizuo/22178/