TP3.2框架U方法拼接 HTML页面路径跳转

2017-08-02  本文已影响0人  peng_js

1.U方法路径拼接

eg  {:U('Task/download/?filename='.$vo['attach_url'].'&name='.$vo['attach'])}"

eg2  {:U('a/b',array(id=>22)}

2.__CONTROLLER路径拼接

    window.location.href="__CONTROLLER__/download/filename/" + path+"/name/"+name;

3.js变量和U方法拼接

var id = $(this).attr('data');

window.location.href="{:U('Active/edit')}?id="+id;

4.

5.<a href="{:U('Active/volunteer?page=')}{$page+1}">下一页</a>

<a href="{:U('Active/volunteer?page=')}{$page+1}&searchText={$searchText}">下一页</a>

<a href="{:U('Dept/index')}?p={$p+1} > </a>

上一篇 下一篇

猜你喜欢

热点阅读