ArcGIS API for JavaScript: UG_QueryLayers (MapServer)
Built using the
ArcGIS API for JavaScript