How to check device in phonegap?.Actually i need that my application is only run only tablet or in Iphone .I need to block my application on other phones only run Android ta
You can do it with JavaScript, using User Agent as already explain in another answer,
But you could also use the Cordova/PhoneGap Device API
http://cordova.apache.org/docs/en/2.8.0/cordova_device_device.model.md.html#device.model
Using var string = device.model;
string will contain the iOS model
Giving you all the information from the native just in case you want to know if its an iPad 1, iPad 2, or iPad Mini
For example "iPad2,5" is the iPad Mini Wifi
Check out this website for mapping information http://theiphonewiki.com/wiki/Models