js jq 小总结

在普通html 页面上自动加载

<script>
    $(function(){
        {if condition="$Request.session.msg neq ''"}
            var msg = '{$Request.session.msg}';
            <?php session('msg',null)?>
            alert(msg);
        {/if}
    });
</script>

在js文件夹里面封装的js

直接

public function xxx()

{

     xxxxxxx;

}

   //执行封装函数  

xxx();    //消费

tp5获取SESSION值  {$Request.session.msg}

 session('msg',$msg);
        $this->redirect($url);

猜你喜欢

转载自blog.csdn.net/heyuqing32/article/details/81383663