footer-component
This commit is contained in:
68
src/pages/learn.astro
Normal file
68
src/pages/learn.astro
Normal file
@@ -0,0 +1,68 @@
|
||||
<body onbeforeunload="return unload()" class="container mx-auto px-4">
|
||||
<main onclick="bodyColor()" >
|
||||
<a href="youtube.com">Youtube</a>
|
||||
<div>
|
||||
<button class="bg-blue-700 text-white" onclick="myfunction()">Click Me</button>
|
||||
<p id="demo"></p>
|
||||
<p id="demo2" onclick="myfunction2()">Click me</p>
|
||||
<!-- <p id="demo3" onclick="myfunction3()">Click</p> -->
|
||||
<button onclick="myfunction3()">Click Me</button>
|
||||
<p id="demo3"></p>
|
||||
<p id="color" onclick="changeColor()">Click To change Color</p>
|
||||
|
||||
<input oncut="textCopied()" type="text" value="Try cut me" class="border">
|
||||
<p id="copy"></p>
|
||||
<label for="">Enter name</label>
|
||||
<input type="text" id="fname" onblur="onBlur()" class="border" />
|
||||
</div>
|
||||
|
||||
<select name="" id="mySelect" onchange="nameChange()">
|
||||
<option value="Kumra">Kumra</option>
|
||||
<option value="Habra">Habra</option>
|
||||
<option value="Barasat">Barasat</option>
|
||||
<option value="Kolkata">Kolkata</option>
|
||||
<option value="North 24 parganas">North 24 parganas</option>
|
||||
<option value="West Bengal">West Bengal</option>
|
||||
</select>
|
||||
<p id="name"></p>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
|
||||
<script is:inline>
|
||||
function nameChange() {
|
||||
var s = document.getElementById("mySelect").value;
|
||||
document.getElementById("name").innerHTML = "You Selected: " + s;
|
||||
}
|
||||
|
||||
// function unload() {
|
||||
// return "Write Something Here......!";
|
||||
// }
|
||||
|
||||
function myfunction() {
|
||||
document.getElementById("demo").innerHTML="A paragraph is a series of sentences that are organized and coherent, and are all related to a single topic. Almost every piece of writing you do that is longer than a few sentences should be organized into paragraphs.";
|
||||
}
|
||||
function myfunction2() {
|
||||
document.getElementById("demo2").innerHTML = "YOU CLICKED ME!";
|
||||
}
|
||||
function myfunction3() {
|
||||
document.getElementById("demo3").innerHTML= "You Clicked Me";
|
||||
}
|
||||
function changeColor() {
|
||||
document.getElementById("color").style.background = "red";
|
||||
document.getElementById("color").style.color = "yellow"
|
||||
}
|
||||
function bodyColor() {
|
||||
document.getElementsByTagName("main")[0].style.background = "yellow"
|
||||
document.getElementsByTagName("main")[0].style.color = "#7c4c23"
|
||||
document.getElementsByTagName("main")[0].style.fontWeight = "1000"
|
||||
}
|
||||
function textCopied() {
|
||||
document.getElementById("copy").innerHTML = "You Copied Me";
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
let x = document.getElementById("fname");
|
||||
x.value = x.value.toUpperCase();
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user