Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

JavaScript Function Document - Fall 2007 | CSCI 2910, Quizzes of Computer Science

Material Type: Quiz; Professor: Tarnoff; Class: Server Side Web Prog; Subject: Computer & Information Science (CSCI); University: East Tennessee State University; Term: Spring 2007;

Typology: Quizzes

Pre 2010

Uploaded on 08/16/2009

koofers-user-jt8a70bf16
koofers-user-jt8a70bf16 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download JavaScript Function Document - Fall 2007 | CSCI 2910 and more Quizzes Computer Science in PDF only on Docsity! Name: ________________________________ CSCI 2910 JavaScript Part 2 Quiz Spring 2007 1. Using the JavaScript function document.write(), write the JavaScript code that would output the tag shown below exactly as it is shown: <body bgcolor="#AFD8D8"> 2. True or false: When declaring a variable in JavaScript, you must define the type, e.g., integer, string, etc. 3. Consider the line of code: retval = parseInt("4.5 people", 10); What value would retval contain? 4. Consider the line of code: retval = parseFloat("3.9%"); What value would retval contain? 5. Consider the line of code: retval = isNaN("4+5"); What value would retval contain? 6. Which of the following follows the proper syntax to reference the value of the input "text1" in form "dataform" which is the only form in the document? (Circle all that apply) a.) document.forms[0].text1.value b.) document.dataform.text1.value c.) document.forms.dataform.text1.value d.) document.forms["dataform"].text1.value 7. In the blank space between the words "Class" and "Spring" below, insert the code that will insert a carriage return on the page displayed in the browser window when this JavaScript command is executed. document.write("<h1>CSCI 2910 Class Spring 2007</h1>"); 8. What is the difference between the functions document.write and document.writeln? 9. Assume that an XHTML page contains a form named "testform" which in turn contains a text input named "textin". What do each of the following two lines of JavaScript code do when executed on this page. mystring = document.testform.textin.value; __________________________________________________ _____________________________________________________________________________________ document.testform.submit(): ______________________________________________________________ _____________________________________________________________________________________ 10. If the string email_string does contain the symbol "@" as the third character, what would the return value be for the JavaScript code email_string.indexOf("@")?
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved