Javascript DOM HTML ins cite Property get

Introduction

Return the URL to a document that explains why some text was inserted:

var x = document.getElementById("myIns").cite;

Click the button to return the value of the cite attribute of the inserted text.

View in separate window

<!DOCTYPE html>
<html>
<body>

<p>This is a text.
<ins id="myIns" cite="why_inserted.htm">This is an inserted text.</ins>
</p>/*from   w  ww  . ja v  a  2 s. co  m*/
<p id="demo"></p>

<button onclick="myFunction()">Test</button>

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

</body>
</html>

The cite property sets or gets the value of the cite attribute of an inserted text.

The cite attribute sets a URL to a document that explains the reason why the text was inserted/changed.

The cite attribute has no visual effect in web browsers.

The cite property accepts and returns a String type value.




PreviousNext

Related