Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div id="el">In an annotation
            template, you define the information to display in the annotation and the
            layout of that information. Annotation templates are stored as specially named
            blocks within your drawing.
            
         </div>
  
  <output id="op1">Test: </output>
</body>
</html>
 
var el = document.getElementById('el'),
    op1 = document.getElementById('op1'),
    op2 = document.getElementById('op2'),
    op3 = document.getElementById('op3'),
    op4 = document.getElementById('op4');
var nodeStart = el.firstChild.splitText(6);
op1.innerHTML = nodeStart.nodeValue;
op1.innerHTML += el.childNodes.length;
/*
el.appendChild(document.createTextNode(' (More Text Added)'));
op2.innerHTML += el.childNodes.length;
el.normalize();
op3.innerHTML += el.childNodes.length;
el.firstChild.splitText(3);
op4.innerHTML += el.childNodes.length;
op5.innerHTML += el.firstChild.nodeValue + el.lastChild.nodeValue;
*/
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers