What is the use of inner html?

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Dec 2007
Posts: 9
Reputation: palcham is an unknown quantity at this point 
Solved Threads: 0
palcham palcham is offline Offline
Newbie Poster

What is the use of inner html?

 
0
  #1
Jan 3rd, 2008
Hi

I am searched about uses of InnerHtml through net but i didn't satisfy that information
so if you known means please send me about uses of inner html

Advance Thanks
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: What is the use of inner html?

 
0
  #2
Jan 3rd, 2008
it allows you to dynamically inject a string of HTML markup into the Document Object Model using JavaScript.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 5
Reputation: temp304 is an unknown quantity at this point 
Solved Threads: 1
temp304's Avatar
temp304 temp304 is offline Offline
Newbie Poster

Re: What is the use of inner html?

 
1
  #3
Jan 3rd, 2008
The innerHTML property is valid for both block and inline elements. By definition, elements that do not have both an opening and closing tag cannot have an innerHTML property.

The innerHTML property takes a string that specifies a valid combination of text and elements.

When the innerHTML property is set, the given string completely replaces the existing content of the object. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document.

This property is accessible at run time, as of Microsoft® Internet Explorer 5. Removing elements at run time, before the closing tag is parsed, could prevent other areas of the document from rendering.

When using innerHTML to insert script, you must include the DEFER attribute in the script element.

You can change the value of the title element using the document .title property.

To change the contents of the table , tFoot , tHead , and tr elements, use the table object model described in How to Build Tables Dynamically . For example, use the rowIndex property or the rows collection to retrieve a reference to a specific table row. You can add or delete rows using the insertRow and deleteRow methods. To retrieve a reference to a specific cell, use the cellIndex property or the cells collection. You can add or delete rows using the insertCell and deleteCell methods. To change the content of a particular cell, use the innerHTML property.

To maintain compatibility with earlier versions of Internet Explorer, this property applies to the textArea object. However, the property works only with strings that do not contain tags. With a string that contains a tag, this property returns an error. It is better to use the innerText property with this object.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC