CSCE 102 Exam 2 Questions With 100% Correct Answers.
A function call can be placed in... - a script element OR part of attribute value of event handler Can a variable have multiple values? - no. a variable can only have ONE value, it is the last value that was assigned and the old value is gone Consider the following: red="blue" 1)="red"; 2)=red; What type of data is 1; 2? What color is the text of 1;2? - 1 is a string because red is in quotations. The text color is red. 2 is a variable. The text color is blue. give an example of a function call in attribute value of an event handler - h2 onmouseover="Wow()" The function call is Wow() h2 onmouseover="Alert('CSCE102');Wow();='yellow'" Give examples of assignment statements - ans=true The_numb=678; x="this is fun"; ="red"; =y; How are tables defined? - with table tagHow do you declare a variable? - use var to declare variables. example: var x; How is a variable given a value? - value is given to a variable using an assignment statement How is data type determined? - determined by the value If you wanted a column to span across multiple columns what would you use? - td colspan="2" If you wanted a row to span multiple rows what would you use? - td rowspan="2" image tag - img src="" alt="me" id="swag" link a picture to an image - a href="" img src="" alt="smile" /a Most important form element? - input Name the 3 possible shapes for an image map - circle, rect or poly Table rows are divided into table data with what? - td True or False: An input statement can be inside a form or used with out one - true Use the My_Color function to change the background based off of a text input - ChangeBackground(ElementById("textbox1").value) input type="text" id="textbox1" When function is called, the value enter in the textbook is sent to the function and maps into A_colorWhat are assignment statements used for? - they are used to give values to variables and give values to properties What are HTML forms used for? give tag - to collect user input form/form What are parameters for? - the purpose of parameter is to send values to a function What are the circle coords? - "x, y,radius" What are the function name rules? - it can have letters, digits, underscores What are the types of data? - integer, floating point, string and boolean
Written for
- Institution
- CSCE 102
- Course
- CSCE 102
Document information
- Uploaded on
- July 9, 2024
- Number of pages
- 5
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal