Today in this post I am going to share a code that will be used for making any HTML element into an editable element. Let, ‘s see the example code

<!DOCTYPE html>
<title>Editable elements</title>
<h1 contenteditable="true" id="title">This is Title</h1>

<span contenteditable="true">This is span</span>

<button onclick="myFun()">Click Me</button>
function myFun(){
var data = document.getElementById("title").innerHTML;



Leave a Reply

Your email address will not be published.