1 Replies Last post: Aug 16, 2008 12:00 AM by Ken  
hegh   7 posts since
Aug 15, 2008
Currently Being Moderated

Aug 15, 2008 8:18 PM

How to get a page's DOCTYPE by using WebBrowser?

 

How to get a page's DOCTYPE by using WebBrowser?And can we use DOCTYPE to judge whether a page is developed by AJAX?

 

 

Thanks a lot!

 

 

 

 

Ken   10 posts since
Aug 14, 2008
Currently Being Moderated
1. Aug 16, 2008 12:00 AM in response to: hegh
Re: How to get a page's DOCTYPE by using WebBrowser?

 

If you have JExplorer's Browser object embedded and you're trying to get the doctype from there, you should be able to do the following:

 

 

browser.getDocument().getDoctype()

 

 

This method returns an org.w3c.dom.DocumentType, which you can then you can make various calls on like getName() or whatever.

 

 

To the best of my knowledge, you won't be able to tell from the docType by itself whether or not the page is using AJAX.

 

 

I hope this helps.

 

 

Ken

 

 

More Like This

  • Retrieving data ...