Home >Backend Development >PHP Tutorial > 在js中调用Smarty的有关问题

在js中调用Smarty的有关问题

WBOY
WBOYOriginal
2016-06-13 13:43:37937browse

在js中调用Smarty的问题
在一个模板页(html)中的js里需要调用列表,对数组进行赋值,但下面的代码貌似不行,请教。

var imag=new Array();
var link=new Array();
var text=new Array();
{section name=list loop=$ppt setp=1 start=1}
imag[$smarty.section.loop.index]={$ppt[list].imgurl};
link[$smarty.section.loop.index]={$ppt[list].linkurl};
text[$smarty.section.loop.index]={$ppt[list].title};
{/section}
//可编辑内容结束
var swf_height=show_text==1?pic_height+20:pic_height;

=======================
需要对imag/link/text数组进行赋值,实现幻灯片效果,请教要怎么修改。谢谢。

------解决方案--------------------
http://my.oschina.net/u/200745/blog/35727

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