CS332a Advanced HTML Programming
Review for First Quiz: Chapters 19 and 20, and online material
- What are some differences between Java and JavaScript? Which is compiled?
Which is interpreted?
- What tags are required to create a JavaScript? What tags are not required,
but are recommended to keep old browsers from crashing?
- In general where would you expect to find JavaScript commands?
- In the head section of a page
- In the body section of a page
- Inside certain tags
- Running on a server
- What is wrong with this script framework?
<script language="JavaScipt">
<!-- a remark is placed here, enclosing the script commands
// a remark in the script is created with double slashes
/ this is another remark in the script -->
<script>
- How can you run a script that is not actually typed in the HTML page?
- use a RUN command
- use a function call
- access the Script() object
- use the SRC attribute of a script tag
- What is the proper notation to set the value of a property of an object?
- object(property) = value
- object.property = = value
- object.property eq value
- object.property = value
- What is the difference between a method and a function?
- Name three events that could take place on a web page involving a
mouse.
- Assume the following line of code is in a script. What does it do?
Explain the purpose of each part of the instruction
onClick="document.bgcolor='blue' "
- How do you create a variable in a JavaScript program? What keyword
is used to create it?
- How do you create a function in a JavaScript program? What keyword
is used to create it?
- What is wrong with the function structure below?
<script language="JavaScript">
function functionName (arguments)
{ program instructions go here
</SCRIPT>
- What JavaScript keyword is used to allow branching in a program?
- If you use a document.write() command to create a link on a page,
why might you need to use both single and double quotes in it?
- What function might be used to create a warning box for the reader
of your page?
- An object is something that is held in memory. What does the document
object represent? What does the window object represent?
- When an error message appears, it may have a line number in it. To
find the line the error message mentions, do you count down from the
top of the page or the top of the script?
- What is a return value?
- How do you get the write() method to put the value stored in a variable
on your page?
- What is the difference between an event and an event handler? Write
a line of code and use it to explain the difference.
- Where do semicolons appear in JavaScript commands?
|