In this paper, we propose simple numerical algorithms for partial differential equations (PDEs) defined on closed, smooth surfaces (or curves). In particular, we consider PDEs that originate from variational principles defined on the surfaces; these include Laplace-Beltrami equations and surface wave equations. The approach is to systematically formulate extensions of the variational integrals and derive the Euler-Lagrange equations of the extended problem, including the boundary conditions that can be easily discretized on uniform Cartesian grids or adaptive meshes. In our approach, the surfaces are defined implicitly by the distance functions or by the closest point mapping. As such extensions are not unique, we investigate how a class of simple extensions can influence the resulting PDEs. In particular, we reduce the surface PDEs to model problems defined on a periodic strip and the corresponding boundary conditions and use classical Fourier and Laplace transform methods to study the well-posedness of the resulting problems. For elliptic and parabolic problems, our boundary closure mostly yields stable algorithms to solve nonlinear surface PDEs. For hyperbolic problems, the proposed boundary closure is unstable in general, but the instability can be easily controlled by either adding a higher-order regularization term or by periodically but infrequently "reinitializing" the computed solutions. Some numerical examples for each representative surface PDEs are presented.