Skip to content

Instantly share code, notes, and snippets.

View sandeshtandan's full-sized avatar

Sandesh Tandan sandeshtandan

View GitHub Profile
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
/* Default CSS */
* {
padding: 0%;
margin: 0%;
box-sizing: border-box;
}
body,
<form>
<div class="input">
<div class="input-top">
<input required type="text" id="name" placeholder="Name">
<input required type="email" id="email" placeholder="Email">
</div>
<textarea required placeholder="Your Comment" id="comment" cols="30" rows="10"></textarea>
<button id="button" type="submit" onclick="myFunction();">Post a Comment</button>
</form>
<ul id="comment-list">
const click = document.querySelector("#click");//select every button to change color
const click1 = document.querySelector("#click1");
const click2 = document.querySelector("#click2");
const click3 = document.querySelector("#click3");
const click4 = document.querySelector("#click4");
const click5 = document.querySelector("#click5");
const click6 = document.querySelector("#click6");
const click7 = document.querySelector("#click7");
const click8 = document.querySelector("#click8");
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
/* Default CSS */
* {
padding: 0%;
margin: 0%;
box-sizing: border-box;
}
body,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Color Changer with Javascript</title>
<link rel="stylesheet" href="style.css">
</head>
const copy = document.querySelector("#copy");
const copyButton = document.querySelector("#copy-button");
copyButton.addEventListener("click", () => {
copy.select(); // Highlight the text
copy.setSelectionRange(0, 99999); //Range of text copied
navigator.clipboard.writeText(copy.value); // copy the text into clipboard
alert("Copied to Clipboard: " + copy.value); // display text copied
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Source+Code+Pro:wght@300;400;500;600;700;800;900&display=swap");
/* Default CSS */
* {
padding: 0%;
margin: 0%;
box-sizing: border-box;
}
body,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Editor</title>
<link rel="stylesheet" href="style.css">
</head>
const editorFirst = document.querySelector("#editor-first");
const iframe = document.querySelector("iframe");
const run = document.querySelector("#run");
run.addEventListener("click", () => {
var html = editorFirst.textContent;
iframe.src = "data:text/html;charset=utf-8," + encodeURI(html);
});
first.addEventListener("keyup", () => {
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Source+Code+Pro:wght@300;400;500;600;700;800;900&display=swap');
/* Default CSS */
*{
padding: 0%;
margin: 0%;
box-sizing: border-box;
}
body, head{