According to active groups combination principle, seventeen compounds 1-(4-substituted phenyl)-5-substituted phenylbutyronitrile-4-substituted 1,2,3-triazoles(7a-7c, 13a-13d) and 1-(4-substituted phenyl)-5-substituted benzylamino-4-substituted 1,2,3-triazoles(5a-5c, 10a-10c and 14a-14d) were designed and synthesized through diazotization, cyclization and condensation reactions from 4-substituted aniline, while compounds 5a-5c, 7b, 7c, 10a, 10c, 13b-13d and 14b-14d have never been reported. Their structures were confirmed by IR, 1H NMR and 13C NMR. The preliminary bioassay showed that all target compounds possessed efficient antibacterial activities, especially, they all exhibited better activities against Escheri-chia coli than fluconazole, while against Staphylococcus aureus, compounds 7a and 10c were more effective than fluconazole, and compounds 13a and 13c were as good as triclosan against Monilia albican.