Javascript language

createTextNode() Method
Previous Home Next

createTextNode() Method

The createTextNode() method creates a text node. This method returns a Text object.

Example


<html>
<body>
<script language="JavaScript">
function fnct_node() {
   var my_node = document.createTextNode(
   "Good Morning!!!");
   document.body.appendChild(my_node); 
} 
</script>
<button onclick="fnct_node()">Create text node</button>
</body>
</html>

Output

pow() Method

The pow() method returns the value of x to the power of y .

Example

<html>
<body>
<button onclick="alert(Math.pow(2,2));">POW</button>
</body>
</html>

 

Output

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: