I have layers list from different map servers.How to do identifier task for those layers
The IdentifyTask does not care if you have multiple different map services in your map. Here is a sample for the JS API samples:
in identifier task they passed URL,that URL i have different url around five url's i have.How to do identifiers for those url.
You will have to use a separate IdentifyTask for each url. The way to handle this is to loop through all the layers in the map and create a array of mapservice urls and create a IdentifyTask for each add each of those IdentifyTasks to a dojo/promise/all that way you do not work with the results until all your IdentifyTasks are complete. There is several threads about this and if you want actual code you can look at then you can look at my Identify Widget for the Web App Builder:
Identify Widget Version 220.127.116.11 - 08/31/2018
Through the webmap is very easy to setup the identify popup for each layer using the arcgis online viewer.
Also using the webmap you have all the other benefits like set the symbology, enable labels for Feature services e.t.c.
Retrieving data ...