hello everyone! I'm using ajax of jquery to get the content of one page.Specifically i get the whole page content like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <div id="demo">content</div> </body> </html> now i want to get the content of div named "demo". i can get whole page content with jquery ajax,but i can't find div innerHTML.help me.
You may be able to do this using a regular expression. Or if the XHTML is strict you could read the document in as XML using responseXML and then just select the node you want to read.