欢迎你的访问
 
返回天空素材库首页 http://www.Skysucai.com  
收藏本站
将本站设为首页
您当前的位置:天空素材首页 -> 一边答题一边就能给出你的成绩
 
栏 目 导 航
. 常用代码 . 综合特效
. 状态特效 . 游戏特效
. 页面背景 . 页面特效
. 页面导航 . 文本操作
. 文本特效 . 图形特效
. 鼠标特效 . 时间日期
. 密码特效 . 浏览相关
. 警告对话 . 技巧特效
. 计数转换 . 测试搜索
. 代码生成 . 播放音乐
. 按钮特效 . 系统相关
. 链接特效 . 黑客性质
. 相关特效 . 窗口特效
. 广告特效 . 表单表格
. 模拟例子
相 关 文 章
· 状态栏显示链接内容...
· 又一例闪动的标题栏...
· 让标题栏文字动起来...
· 状态栏显示链接内容...
· 在输入框中输入什么...
· 状态栏打字效果特效...
· 闪动的标题栏特效
· 字符来回出现于状态...
· 在标题栏显示时间特...
· 一款状态滚动的文字...
本 类 热 门
· 问卷调查脚本
· 不错的页面搜索脚本
· 在跳出的对话框中输入...
· 较为简单的搜索器
· 这个脚本将查询的结果...
· 再一个不错的搜索脚本...
· 同样是搜索脚本,好像...
· 又一不错的搜索引行。...
· 若干道试题,自动给出...
· 给出试题,完成后跳窗...
· 一边答题一边就能给出...
· 一边答题一边就能给出...
更多  
 
 
更多  
最 新 推 荐
· 状态栏时间跳动特效
· 农历挂历特效
· 真正的万年历
· 网页特效 菜单-会动的...
· 网页特效 时间-任意位...
· 个人网页特效-有前后日...
· 时间每过一秒,Radio就...
· 时钟显示在任意指定位...
· 带开关的Form时钟
· 记录几天后的日期
· 显示登陆时间
· 退出时显示访问时间
更多  
     
一边答题一边就能给出你的成绩
一边答题一边就能给出你的成绩
作者:佚名  来源:本站整理  名称:一边答题一边就能给出你的成绩 

减小字体 增大字体

       

[提示:你可先按照下面代码提示修改 上面部分代码,再按运行,此处看到的演示不完全正确]

此特效的详细完整代码如下:

要完成此效果把如下代码加入到<body>区域中

<script>

 <!-- hide

 var ans = new Array;

 var done = new Array;

 var score = 0;

 // LOSER!  Don't read the answers!

 ans[1] = "c";

 ans[2] = "a";

 ans[3] = "b";

 ans[4] = "b";

 ans[5] = "d";

 ans[6] = "c";

 ans[7] = "c";

 ans[8] = "c";

 ans[9] = "d";

 ans[10] = "a";

 function Engine(question, answer) {

         if (answer != ans[question]) {

                 if (!done[question]) {

                         done[question] = -1;

                         alert("你选错了,你答对了" + score + "个");

 

                         }

 

                 else {

 

                         alert("你已经选过这个了!");

 

                         }

 

                 }

 

         else {

 

                 if (!done[question]) {

 

                         done[question] = -1;

 

                         score++;

 

                         alert("恭喜你,你答对了" + score + "个");

 

                         }

 

                 else {         

 

                         alert("你已经回答过这个了!");

 

                         }

 

                 }

 

 }

 

                

 

 function NextLevel () {

 

         if (score > 10) {

 

                 alert("你作弊了吧!");

 

                 }

 

         if (score >= 7 && score <= 9) {

 

                 alert("你答的不错!!!")

 

                 //self.location="GameQuiz2.htm"

 

                 }

 

         else {

 

                 alert("你还要继续努力!!!")

 

                 }

 

 }

 

 

 

 //-->

 

 </script>

 

  <form>

 

 <b>1. WARM-UP: Who created the famous <i>WarCraft 2</i>?</b><p>

 

 <input type=radio value="a" onClick="Engine(1, this.value)">Sierra On-Line<br>

 

 <input type=radio value="b" onClick="Engine(1, this.value)">BlueByte<br>

 

 <input type=radio value="c" onClick="Engine(1, this.value)">Blizzard Entertainment<br>

 

 <input type=radio value="d" onClick="Engine(1, this.value)">Microsoft<p>

 

 

 

 <b>2. This famous 3D shooter claimed <i>PC Gamer's</i> Game of 1994 Award.</b><p>

 

 <input type=radio value="a" onClick="Engine(2, this.value)">Doom<br>

 

 <input type=radio value="b" onClick="Engine(2, this.value)">Hexen<br>

 

 <input type=radio value="c" onClick="Engine(2, this.value)">Descent<br>

 

 <input type=radio value="d" onClick="Engine(2, this.value)">Wolfenstein 3D<p>

 

 

 

 <b>3. The first intergalatic combat game.  Name it.</b><p>

 

 <input type=radio value="a" onClick="Engine(3, this.value)">Master of Orion<br>

 

 <input type=radio value="b" onClick="Engine(3, this.value)">Star Control<br>

 

 <input type=radio value="c" onClick="Engine(3, this.value)">StarCraft<br>

 

 <input type=radio value="d" onClick="Engine(3, this.value)">Star Trek<p>

 

 

 

 <b>4. The game ever to contain graphics was this classic by Roberta Williams.</b><p>

 

 <input type=radio value="a" onClick="Engine(4, this.value)">King's Quest<br>

 

 <input type=radio value="b" onClick="Engine(4, this.value)">Mystery House<br>

 

 <input type=radio value="c" onClick="Engine(4, this.value)">Time Zone<br>

 

 <input type=radio value="d" onClick="Engine(4, this.value)">Mission: Asteriod<p>

 

 

 

 <b>5. The first real-time strategy game was: </b><p>

 

 <input type=radio value="a" onClick="Engine(5, this.value)">WarCraft: Orcs & Humans<br>

 

 <input type=radio value="b" onClick="Engine(5, this.value)">Command & Conquer<br>

 

 <input type=radio value="c" onClick="Engine(5, this.value)">Dune<br>

 

 <input type=radio value="d" onClick="Engine(5, this.value)">Dune 2<p>

 

 

 

 <b>6. In PC Gamer, Quake won these 'of-the-year' awards (1996): </b><p>

 

 <input type=radio value="a" onClick="Engine(6, this.value)">Best Game, Best Action Game<br>

 

 <input type=radio value="b" onClick="Engine(6, this.value)">Best Action Game, Best Multiplayer<br>

 

 <input type=radio value="c" onClick="Engine(6, this.value)">Best Sound Effects, Best Multiplayer<br>

 

 <input type=radio value="d" onClick="Engine(6, this.value)">All of the above<p>

 

 

 

 <b>7. The best selling game of all time is: </b><p>

 

 <input type=radio value="a" onClick="Engine(7, this.value)">WarCraft 2<br>

 

 <input type=radio value="b" onClick="Engine(7, this.value)">C&C: Red Alert<br>

 

 <input type=radio value="c" onClick="Engine(7, this.value)">Sim City<br>

 

 <input type=radio value="d" onClick="Engine(7, this.value)">King's Quest 5<p>

 

 

 

 <b>8. This is a turn-based strategy game: </b><p>

 

 <input type=radio value="a" onClick="Engine(8, this.value)">C&C: Red Alert<br>

 

 <input type=radio value="b" onClick="Engine(8, this.value)">Might and Magic 3<br>

 

 <input type=radio value="c" onClick="Engine(8, this.value)">Heroes of Might and Magic<br>

 

 <input type=radio value="d" onClick="Engine(8, this.value)">Daggerfall: The Elder Scrolls<p>

 

 

 

 <b>9. PC Gamer's <i>Best Game of the 1996</i> went t </b><p>

 

 <input type=radio value="a" onClick="Engine(9, this.value)">C&C: Red Alert<br>

 

 <input type=radio value="b" onClick="Engine(9, this.value)">Tomb Raider<br>

 

 <input type=radio value="c" onClick="Engine(9, this.value)">Quake<br>

 

 <input type=radio value="d" onClick="Engine(9, this.value)">Civilization 2<p>

 

 

 

 <b>10. Blizzard's new release, <i>Diablo</i> is a: </b><p>

 

 <input type=radio value="a" onClick="Engine(10, this.value)">Role Playing Game<br>

 

 <input type=radio value="b" onClick="Engine(10, this.value)">2D Action Game<br>

 

 <input type=radio value="c" onClick="Engine(10, this.value)">3D Action Game<br>

 

 <input type=radio value="d" onClick="Engine(10, this.value)">Simulation<p>

 

 

 

 <center>

 

 <input type=button onClick="NextLevel()" value="Advance to next level">

 

 </center>

 

 </form>

[返回上一页] [打印一边答题一边就能给出你的成绩]
     
| 关于本站 | 服务条款 | 友情连接 | 网站地图 | 联系方式 | 广告联系 |