We have investigated the ram-pressure stripping of disk galaxies in clusters at various redshifts and in cluster progenitors; the clusters are formed via a hierarchical clustering scenario. We consider a radially infalling galaxy whose initial position and velocity are given by a spherical collapse model of structure formation. Moreover, since observations show that the intracluster medium (ICM) of nearby clusters is nongravitationally heated, we study the effect of the nongravitational heating on the ram-pressure stripping. For a given redshift, we find that ram-pressure stripping has more influence on galaxies in more massive clusters. On the other hand, for a given mass, it has more influence on galaxies in clusters at higher redshifts. In particular, we predict that in rich clusters at z greater than or similar to 1, most of the galaxies are affected by ram-pressure stripping. While the nongravitational heating significantly reduces the influence of ram-pressure stripping on galaxies in clusters with a mass smaller than (1-5) x 10(13) M., it does not affect the influence in richer clusters. If the ICM is heated nongravitationally at z >> 1, ram-pressure stripping does not occur at z similar to 1-2 in the progenitors of clusters observed at 0 less than or similar to z less than or similar to 0.5 because the heat makes the ICM fraction of the cluster progenitors small. On the other hand, if the ICM is heated non-gravitationally at z similar to 0 for the first time, the ram-pressure stripping occurs even at z similar to 3. We compare the results with the observations of galaxies in clusters at various redshifts.