A method of preventively treating a subject at the risk of developing infections of a respiratory virus is disclosed. The method includes a step of administering to the subject an effective amount of a peptide synthesized through a chemical route or by a genetic engineering process, characterized in that the peptide has a functional domain capable of binding to a surface glycoprotein of a respiratory virus and has an activity of inhibiting infection of the respiratory virus, wherein the peptide has 5 or more basic amino acids, among which 2 or more basic amino acids are in N-terminal region or C-terminal region of the peptide and wherein the peptide consists of an amino acid sequence that is at least 90% identical to SEQ ID NO: 10. The invention also discloses the mechanism of the peptides in inhibition of said infections, which provides theory support for developing new prophylactic/therapeutic agents with broad-spectrum antiviral activities.