<html>
<head></head>
<body>
<input id="id1" type="number" min="100" max="300" required>
<button onclick="myFunction()">OK</button>
<p id="demo"></p>
<script>
function myFunction() {
const inpObj = [Link]("id1");
if (![Link]()) {
[Link]("demo").innerHTML = [Link];
}
}
</script>
<input id="id1" type="number" max="100">
<button onclick="myFunction()">OK</button>
<p id="demo"></p>
<script>
function myFunction() {
let text = "Value OK";
if ([Link]("id1").[Link]) {
text = "Value too large";
}
}
</script>
<p id="demo"></p>
<script>
[Link]("name","John Doe");
[Link]("demo").innerHTML = [Link]("name");
</script>
<p id="demo"></p>
<script>
[Link]("name","John Doe");
[Link]("demo").innerHTML = [Link]("name");
</script>
<p id="demo">Fetch a file to change this text.</p>
<script>
let file = "fetch_info.txt"
fetch (file)
.then(x => [Link]())
.then(y => [Link]("demo").innerHTML = y);
</script>
<button onclick="getLocation()">Try It</button>
<p id="demo"></p>
<script>
const x = [Link]("demo");
function getLocation() {
if ([Link]) {
[Link](showPosition);
} else {
[Link] = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
[Link]="Latitude: " + [Link] +
"<br>Longitude: " + [Link];
}
</script>
</body>
<html>