'String' Example : String « Javascript Objects « JavaScript DHTML






'String' Example

 
    
<html>
<body>
<div id="myDiv" style="width:100; height:100;">This is some sample text</div>
<script language="javascript">
function function1(){
    var temp = new String(); temp = myDiv.innerText; alert(temp); 
} 
</script>
<button onclick="function1();">String function</button>
</body>
</html>

    
      
        
  








Related examples in the same category

1.String.italics()
2.String.concat()
3.String.big()
4.String.blink()
5.String.sup();
6.String.strike()
7.String.bold()
8.String.small()
9.String.link()