回 帖 发 新 帖 刷新版面

主题:JavaScript期中考试求助 Help!!

Part A                   

1. VBScript is a server side Script
a. True    b. False    

2. Which command is used to display messages?
a. alert      b. prompt         c. input      d. read

3. Which of the following is not number variable?
a. 032          b. ‘23’         c.0xff      d -3E2

4. Which of the following is Boolean type?
a. True or false        b. 0 or 1      c. 't' or 'f'         d. T or F

5.What will be the value a=parseInt(“x5ab12”)
a. NaN        b. 5        c. ab           d. 12

6. What will be the value of  num=eval("2abc123")
a. NaN         b. 0          c. 123        d. 2

7.What is the value of 0.6.5E-2 ?
a. 0.006.5        b  0.65     c 0.0065    d. 0.00065

8. 0x6C is a valid hexa decimal type
a. True        b. False

9. Which tag is used to make scrolling test?
a.<marquee>        b. <scroll>        c. <move>   d. <img>

10. What language can be used as a server side script?
a. Java    b. JavaScript    c. VBScript        d. J Script

Part B                                    
11. mat=new Array(2,4,true,7.5,null) what will be mat[4]?

12. What will be 05 + 06 = 


13. Mat1=new Array (5,7.8, true, null, new Array(false,12,89,”Hello”))
       How will you display 89?  

14. One array is as follows mat[0]=null, mat[1]=5e-6, mat[2]=”abc”, mat[3][0]=044 , 
mat[3][1]=0xB . How will you define this array?

15. What will be the value of 0xFF-0564? 

16. Write about any 3 loops in JavaScript?

17. What are event-handling functions?

18. How will you make click event not to work in a hyperlink?

19. Write a script to make to decrease a variable from 20 by  2 until 0 in for loop?

20. How can you pass values to a function?

Part C      
21. Write a function to store 10 numbers in an array and sort the numbers small to big

22. Write a program to enter Item No, ItemName, Price, Quantity from input
       find the total price and discount
       if price is >= 100 then discount = 10% of total price, if price <100 and >= 50 
 then discount=5% of total price.  In all other case no discount.

回复列表 (共1个回复)

沙发

这都行。。。。。。。

我来回复

您尚未登录,请登录后再回复。点此登录或注册