Home > php教程 > php手册 > body text

smarty中js的调用方法示例

WBOY
Release: 2016-06-06 20:18:50
Original
1730 people have browsed it

这篇文章主要介绍了smarty中js的调用方法示例,是smarty模板设计中经常会遇到的问题,非常实用,需要的朋友可以参考下

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

一、问题:

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

二、解决办法:

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

复制代码 代码如下:

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


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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!