Older previous answers have been deleted because they contain outdated information.
Using at least Xcode 4 and Safari 6, open the web view in iPhone Simulator, and then switch to the Safari desktop. In the Safari Develop menu (you must enable it in the settings) you will find the iPad Simulator menu, which allows you to open Safari Web Inspector for pages open in the simulator!
source share