Example of calling method for js in smarty

  • 2021-07-24 10:18:25
  • OfStack

This article describes the example of smarty in the js call method, to share for your reference. Specific methods are analyzed as follows:

1. Issues:

Sometimes, in smarty, when js is included, the whole page will not be displayed, and programmers often look for errors in the page, and the program page and template page are checked many times without errors, which makes them very depressed.

2. Solutions:

Copy the js code in the template page and put it in the newly created js file, and then include it in the template page, such as:

{popup_init src="css/commen.js"}

In this way, the problem will be solved.

I hope this article is helpful to everyone's PHP programming.


Related articles: