  We study an inflation mechanism based on attractor properties in cosmological
evolutions of a spatially flat Friedmann-Robertson-Walker spacetime based on
the Einstein-scalar field theory. We find a new way to get the Hamilton-Jacobi
equation solving the field equations. The equation relates a solution
`generating function' with the scalar potential. We analyze its stability and
find a later time attractor which describes a Universe approaching to an
eternal-de Sitter inflation driven by the potential energy, $V_0>0$. The
attractor exists when the potential is regular and does not have a linear and
quadratic terms of the field. When the potential has a mass term, the attractor
exists if the scalar field is in a symmetric phase and is weakly coupled,
$\lambda<9V_0/16$. We also find that the attractor property is intact under
small modifications of the potential. If the scalar field has a positive
mass-squared or is strongly coupled, there exists a quasi-attractor. However,
the quasi-attractor property disappears if the potential is modified. On the
whole, the appearance of the eternal inflation is not rare in scalar cosmology
in the presence of an attractor.
