Anodic alumina nanochannel arrays with high aspect ratio have many existing and upcoming potential applications in nanotechnology. Many researchers have tried to use anodic alumina as the template for the growth of nanowires of different materials by electrodeposition, but still facing the undesired problem of deposition non-niformity in each anodic alumina nanochannel. There are, for example, always significant statistical fluctuations in length of the formed nanowires in the anodic alumina nanochannels. To solve the above mentioned undesired problem, we have therefore developed a new way that can control the deposition of silver in each nanochannel of the anodic alumina. The length of the nanowires can be controlled precisely by the anodic alumina film thickness.