Get Ins Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Ins

Introduction

The Ins object represents an HTML <ins> element.

You can access an <ins> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><ins id="myIns" cite="http://java2s.com">This is an inserted text.</ins>
</p>/*from  w  w  w . j  a v a2  s .  c  o m*/

<button onclick="myFunction()">get the URL of ins element</button>

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

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

</body>
</html>

Related Tutorials