HTML
<body>
<h1>Text Editor</h1>
<p></p>
<input type="text" id="text" /><br />
CSS
// TEXT EDITOR USING INPUT EVENT
let inp=document.querySelector("#text");
let p=document.querySelector("p");
inp.addEventListener("input",function(){
console.log(this.value);
p.innerText=inp.value;
});
Comments
Post a Comment