JAVASCRIPT WEEK 3 Word Scramble
|
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Question | Answer |
prompt("Hello"); | Display a prompt box |
alert("Hello"); | Display alert message |
open(" | Open the specific website in a new tab |
function closeFunction(){ close();} <input type="button" value="Close" onclick="closeFunction()"/> If you press the 'Close button' | The website will close |
confirm("Hello"); | Display a confirmation text with OK and CANCEL button |
screen.width | Get your screen's width |
var totalparagraph=document.getElementsByTagName("p"); alert("The total paragraphs are: "+totalparagraph.length); | Count the paragraphs |
if document.passwordvalid.password.value.length>10{ document.write("Valid Password"); } | If the password's length is greater than 10, then the code will display the message "Valid Password". |
what does the code below check? if (isNaN(number)) {} | If the variable 'number' is not a number |
var grade=document.getElementById("number").value; | Get and returns an element with id 'number' |
Created by:
kcoulee
Popular Computers sets