ins cite Property - Change the value of the cite attribute: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Ins

Description

ins cite Property - Change the value of the cite attribute:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>This is a text.
<ins id="myIns" cite="http://java2s.com">This is an inserted text.</ins>
</p>//from w w  w . ja  va2 s  .  c om

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

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

<script>
function myFunction() {
    document.getElementById("myIns").cite = "http://www.example.com/a.htm";
    document.getElementById("demo").innerHTML = "The value of the cite attribute was changed to 'www.example.com/a.htm'.";
}
</script>

</body>
</html>

Related Tutorials