Development| HTML| JavaScript| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
JavaScript applyElement method Example 
 

The user can apply some properties to the element of the HTML document by using the method applyElement(), which is called on some object of element.

 

JavaScript applyElement method Example

                         

The user can apply some properties to the element of the HTML document by using the method applyElement(), which is called on some object of element. Here in this example we have applied element links properties to the "Div Content"  by removing link from the link.

Example how to use applyElement:

 Object.applyElement( elementProperty);

Description of example:

In the following example code we have created a link in HTML by using the tag <a></a> and one div by using the <div></div> tag and to apply the element's property we have created a button. As soon as user clicks on the button it will call the JavaScript function ApplyElement() defined in the <script> </script> tag.

applyElementExample.html

<html>
  <head>
    <title>applyElement Example</title>
     <script>
	function ApplyElement(){
	 document.getElementById('divId')
         .applyElement(document.links[0]);
	}
     </script>
  </head>
    <body>
      <a href="#">Link</a> 
 	<div id="divId">Div Content</div>
	<button onclick="ApplyElement(); this.disabled=true;">
          Apply The Link To The Div
        </button>
  </body>
</html>

 

Output:

When you will click on the button it will apply link to the div.

Download Source Code

                         

» View all related tutorials
Related Tags: java javascript c attributes script reference object method sed remove ip attribute node move nat to ref e it alter

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.