Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>This is a text.
<ins id="myIns" cite="why_inserted.htm">This is an inserted text.</ins>
</p>

<p>Click the button to return the value of the cite attribute of the inserted text.</p>

<p id="demo"></p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    var x = document.getElementById("myIns").cite;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy