gaufeo 发表于 2007-4-27 11:32:54

***测试搜索***一边答题一边就能给出你的成绩 (呵不好意思英文版自己慢慢

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果把如下代码加入到<body>区域中

<script>

<!-- hide

var ans = new array;

var done = new array;

var score = 0;

// loser!don't read the answers!

ans = "c";

ans = "a";

ans = "b";

ans = "b";

ans = "d";

ans = "c";

ans = "c";

ans = "c";

ans = "d";

ans = "a";

function engine(question, answer) {

         if (answer != ans) {

               if (!done) {

                         done = -1;

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



                         }



               else {



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



                         }



               }



         else {



               if (!done) {



                         done = -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 to: </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>
      










------ ------------- ----------------- --

拥有三 人行论坛管理系列软件,一个 人就可以管理一个论坛的更新维护。还能使您的论坛有千人在 线的真实火暴效果,让 您不在为论坛 因没有人气而留不住会员而烦恼,使您 的论坛早日成为一流的论坛。详情请登陆网站:http://w ww. cnsrx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985 227)
页: [1]
查看完整版本: ***测试搜索***一边答题一边就能给出你的成绩 (呵不好意思英文版自己慢慢