I\'m starting to try and do some web based game programming for my iPhone, and other web enabled phones that my friends have, and was having a hard time finding information
iOS 4.2 provides Accelerometer & Gyroscope support through the DeviceOrientation API.
DeviceMotionEvent class reference
DeviceOrientationEvent class reference
Here a working javascript snippet.