Home  >  Article  >  Backend Development  >  smarty中js的调用方法示例_PHP

smarty中js的调用方法示例_PHP

WBOY
WBOYOriginal
2016-05-31 19:28:57853browse

本文实例讲述了smarty中js的调用方法,分享给大家供大家参考。具体方法分析如下:

一、问题:

有时候,在smarty中,包含js的时候,整个页面就不会显示,而程序员往往在页面中找错误,程序页面,模板页面检查了多次都没有错误,就很郁闷了。

二、解决办法:

把模板页面中的js代码拷贝出来放在新建的js文件中,然后在包含到模板页面里面,如:

代码如下:

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


这样一来,问题就解决了。

希望本文所述对大家的PHP程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn