Hi there sally613!
I have an article for you that can help you troubleshoot the issue you are seeing with your iPad. This article is about troubleshooting any Wi-Fi connections on an iOS device, but it has a specific section on the issue you are seeing:
iOS: Troubleshooting Wi-Fi networks and connections
http://support.apple.com/kb/ts1398
I would recommend that you follow all of the relevant troubleshooting steps in that article, but this specific section deals with the issue as you have described it here:
Unable to access the Internet while connected to Wi-Fi
If your IP address is 169.254.xxx.xxx, see this article.
- If you do not have a self-assigned IP address, see if other Wi-Fi devices on your network have Internet access.
Thanks for using the Apple Support Communities. Have a good one!
-Braden