In order to remove metals (Zn & Mg) located in wastewater, a new series of clickable polystyrene Merrifield grafted with azide and alkynes were synthesized and implicated in this domain. In a first step, we transformed the polystyrene Merrifield into the known Azidomethyl polystyrene, in a second step, a coupling reaction between the Azidomethyl polystyrene and dipropargylamine was realized for the synthesis of a new terminated polystyrene alkyne containing one unit of (1,4)-triazole. To increase the length of the chain grafted on the polystyrene Merrifield, several coupling reactions are applied, the main idea of this work was to increase the number of (1,2,3)-triazole units of this grafted chain. The click chemistry based on the Huygens's reaction catalyzed by copper (I) was used in this synthesis, the new polymers containing (1,4)-disubstituted triazole are tested for the extraction of Mg and Zn located in wastewater. The structure of new obtained polymers was confirmed by infrared spectroscopy (ATR-FTIR), UV-visible spectroscopy and elemental analysis for nitrogen. Differential Thermal Analysis (DTA) and Thermo Gravimetric Analysis (TGA) were used to study crosslinking behavior of these polymers. This study shows a low selectivity of studied polymers for the retention of magnesium, while for the Zinc, the percentage removal was average, it's in the order of 30%.