省市联动.从数据库里读出来.非smarty里.可以做到.smarty里怎么做呢

解决方案 »

  1.   

    没有搞明白.联动,与Smarty有何关系.smarty只是一个模板引擎.
      

  2.   

    就是套2个SECTION,LZ是这个意思吧?============
    <{section name=f loop=$cat}>  
       <ul class="list_a">
          <strong><a href="product.php?cat=<{$cat[f].fa.id}>"><{$cat[f].fa.title}></a></strong>
          
      <{section name=s loop=$cat[f].s}>    
          <li><a href="product.php?cat=<{$cat[f].s[s].id}>"><{$cat[f].s[s].title}></a></li>
     <{/section}>
       </ul>
    <{/section}>以前写过类似的,参考一下
      

  3.   

    其实,如果是单级联动,需要用到ajxa
    如果单存的是两个,那么用两个section就可以了http://www.wzdm.net/article/list_5.html
      

  4.   

    从数据库里读出来.要放入js中吧,然后进行事件联动.smarty中怎么放呢,