We simulate the dynamic response of $\mathrm{H}_{2}^{+}$ in a linearly polarized laser field by numerically solving the time-dependent Schrödinger equation (TDSE). The elliptically polarized high-order harmonics generated by $\mathrm{H}_{2}^{+}$ irradiated by the linearly polarized laser field is systematically investigated. It is found that the amplitude and rotation of the ellipticity of harmonics are affected by the alignment angle and internuclear distance of molecule, and by analyzing the change of the forces acted on the ionized electrons and the trajectories of the electrons, the phenomena are resulted from the change in the direction of the total coulomb forces from the two nuclear felt by the re-collided ionized electrons in the direction perpendicular to laser polarization direction. According to the influence law, we can select the harmonics with specific frequency band under different alignment angles, then synthesize the isolated attosecond pulses with different rotation, which can be continuously converted from right-handed circular polarization, linear polarization and left-handed circular polarization with the change of the alignment angle. It provides a new possible approach to the real-time detection of molecular states by attosecond pulses and obtaining more optimized harmonics by molecular properties.