HTML tags, JavaScript Functions Flashcards
displays the alert box containing message with ok button
alert()
displays the confirm dialog box containing message with ok and cancel button
confirm()
displays a dialog box to get input from the user.
prompt()
opens the window.
open()
closes the window.
close()
performs action after specified time like calling function, evaluating expressions etc
setTimeout()
JavaScript BOM (Browser Object Model)
- alert()
- confirm()
- prompt()
- open()
- close()
- setTimeout()
The ____ object represents the whole html document
Document
writes the given string on the document.
write(“string”)
writes the given string on the document with newline character at the end.
writeIn(“string”)
returns the element having the given id value.
getElementById()
WALANG “S” SA ELEMENT DITO HA!!!
returns all the elements having the given name value.
getElementsByName()
returns all the elements having the given tag name.
getElementsByTagName()
returns all the elements having the given class name.
getElementsByClassName()
The Access the target element(s) using methods:
- getElementById()
- getElementsByName()
- getElementsByClassName()
- getElementsByTagName()
Displays an alert dialog box with a message
alert()
Displays a dialog box to prompt the user for input.
prompt()
Displays a dialog box with a message and OK/Cancel buttons.
confirm()
Converts a string to an integer.
parseInt()
Converts a string to a floating-point number.
parseFloat()
Converts a value to a string
String()
Converts a value to a number.
Number()
Checks if a value is NaN (Not-a-Number).
isNaN()
Generates a random number between 0 and 1.
Math.random()