Device Sync
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Week 1 Class 1</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Javascript test</h1>
|
||||
<script>
|
||||
document.write("Hello Class, Welcome to JavaScript <br>");
|
||||
document.write("I love JavaScript");
|
||||
|
||||
document.write("Hello Class, Welcome to JavaScript")
|
||||
document.write("<br>");
|
||||
document.write("I love JavaScript <br>");
|
||||
|
||||
window.alert("ALERT ALERT ALERT ALERT");
|
||||
window.confirm("CONFIRM PLEASE CONFIRM PLEASE");
|
||||
window.prompt("PROMPT HERE PROMPT HERE");
|
||||
</script>
|
||||
<button type="submit" id="testButton" onclick="testButton()">
|
||||
<p>Press me!</p>
|
||||
</button>
|
||||
<p id="buttonLabel">Button pressed!</p>
|
||||
<hr>
|
||||
<h2>Form example</h2>
|
||||
<input type="text" id="firstName" placeholder="First name">
|
||||
<input type="text" id="lastName" placeholder="Last name">
|
||||
<input type="email" id="email" placeholder="Email">
|
||||
<input type="text" id="phone" placeholder="Phone number">
|
||||
<p id="formLabel">You entered: </p>
|
||||
<button type="submit" id="repeatButton" onclick="repeatInfo()">Repeat Info</button>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Week 1 Class 1</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Javascript test</h1>
|
||||
<script>
|
||||
document.write("Hello Class, Welcome to JavaScript <br>");
|
||||
document.write("I love JavaScript");
|
||||
|
||||
document.write("Hello Class, Welcome to JavaScript")
|
||||
document.write("<br>");
|
||||
document.write("I love JavaScript <br>");
|
||||
|
||||
window.alert("ALERT ALERT ALERT ALERT");
|
||||
window.confirm("CONFIRM PLEASE CONFIRM PLEASE");
|
||||
window.prompt("PROMPT HERE PROMPT HERE");
|
||||
</script>
|
||||
<button type="submit" id="testButton" onclick="testButton()">
|
||||
<p>Press me!</p>
|
||||
</button>
|
||||
<p id="buttonLabel">Button pressed!</p>
|
||||
<hr>
|
||||
<h2>Form example</h2>
|
||||
<input type="text" id="firstName" placeholder="First name">
|
||||
<input type="text" id="lastName" placeholder="Last name">
|
||||
<input type="email" id="email" placeholder="Email">
|
||||
<input type="text" id="phone" placeholder="Phone number">
|
||||
<p id="formLabel">You entered: </p>
|
||||
<button type="submit" id="repeatButton" onclick="repeatInfo()">Repeat Info</button>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +1,19 @@
|
||||
document.getElementById("buttonLabel").style.display = "none";
|
||||
|
||||
function testButton() {
|
||||
const buttonLabel = document.getElementById("buttonLabel");
|
||||
if (buttonLabel.style.display === "block") {
|
||||
buttonLabel.style.display = "none";
|
||||
} else {
|
||||
buttonLabel.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function repeatInfo() {
|
||||
const formLabel = document.getElementById("formLabel");
|
||||
const firstName = document.getElementById("firstName").value;
|
||||
const lastName = document.getElementById("lastName").value;
|
||||
const email = document.getElementById("email").value;
|
||||
const phone = Number(document.getElementById("phone").value);
|
||||
formLabel.innerHTML += `${firstName} ${lastName}, ${email}, ${phone}`
|
||||
document.getElementById("buttonLabel").style.display = "none";
|
||||
|
||||
function testButton() {
|
||||
const buttonLabel = document.getElementById("buttonLabel");
|
||||
if (buttonLabel.style.display === "block") {
|
||||
buttonLabel.style.display = "none";
|
||||
} else {
|
||||
buttonLabel.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function repeatInfo() {
|
||||
const formLabel = document.getElementById("formLabel");
|
||||
const firstName = document.getElementById("firstName").value;
|
||||
const lastName = document.getElementById("lastName").value;
|
||||
const email = document.getElementById("email").value;
|
||||
const phone = Number(document.getElementById("phone").value);
|
||||
formLabel.innerHTML += `${firstName} ${lastName}, ${email}, ${phone}`
|
||||
}
|
||||
Reference in New Issue
Block a user