ASP.NET and JavaScript Fundamentals
Test your knowledge of core web development technologies including ASP.NET 2.0 features and JavaScript programming fundamentals covering syntax, functions, loops, and browser interactions.
Questions
What is the correct syntax for referring to an external script called "xxx.js"?
- <script src="xxx.js">
- <script name="xxx.js">
- <script href="xxx.js">
- <script id="xxx.js">
An external JavaScript must contain the
- True
- False
How do you write "Hello World" in an alert box?
- alert("Hello World")
- alertBox="Hello World"
- alertBox("Hello World")
- msgBox("Hello World")
How do you create a function?
- function myFunction()
- function=myFunction()
- function:myFunction()
- function myFunction
How do you call a function named "myFunction"?
- call myFunction()
- call function myFunction
- myFunction()
- call function myFunction()
How do you write a conditional statement for executing some code if "i" is equal to 5?
- if (i==5)
- if i=5 then
- if i=5
- if i==5 then
How do you write a conditional statement for executing some code if "i" is NOT equal to 5?
- if =! 5 then
- if (i != 5)
- if (i <> 5)
- if <> 5
How does a "while" loop start?
- while (i<=10)
- while (i<=10;i++)
- while i=1 to 10
- while (i=0;i<=10;i++)
How does a "for" loop start?
- for (i = 0; i <= 5)
- for i = 1 to 5
- for (i <= 5; i++)
- for (i = 0; i <= 5; i++)
How can you add a comment in a JavaScript?
- //This is a comment
- <!--This is a comment-->
- 'This is a comment
- /*This is a comment
What is the correct JavaScript syntax to insert a comment that has more than one line?
- <!--This comment has more than one line-->
- //This comment has more than one line//
- /This comment has more than one line/
- 'This comment has more than one line
What is the correct way to write a JavaScript array?
- var txt = new Array(1:"tim",2:"kim",3:"jim")
- var txt = new Array("tim","kim","jim")
- var txt = new Array:1=("tim")2=("kim")3=("jim")
- var txt = new Array="tim","kim","jim"
How do you round the number 7.25, to the nearest integer?
- round(7.25)
- Math.round(7.25)
- rnd(7.25)
- Math.rnd(7.25)
How do you find the number with the highest value of x and y?
- Math.max(x,y)
- top(x,y)
- Math.ceil(x,y)
- ceil(x,y)
What is the correct JavaScript syntax for opening a new window called "w2" ?
- w2=window.open("http://www.w3schools.com");
- w2=window.new("http://www.w3schools.com");
- w2=window("http://www.w3schools.com");
- w2=openwindow("http://www.w3schools.com");
How do you put a message in the browser's status bar?
- window.status = "put your message here"
- status("put your message here")
- statusbar = "put your message here"
- window.status("put your message here")
How can you find a client's browser name?
- browser.name
- navigator.appName
- client.navName
- All the above
How many bit support does ASP.NET 2.0 provide?
- 16-bit support
- 32-bit support
- 64-bit support
- 128-bit support
ASP.NET 2.0 is not fully backward compatible with ASP.NET previous versions.
- True
- False
Which of the following features of ASP.NET 2.0 provides 'visual inheritance'
- Themes
- Site Navigation
- Gird View
- Master Pages