html 笔记 {$time|date="Y-m-d H:i:s",###}

1、 {$time|date="Y-m-d H:i:s",###}

2、a标签验证后再跳转新窗口

<a onclick="return check(this);" data-id="1"  href="http://www.aaa.com.html" target="_blank">点击验证跳转</a>
function check($this){
    var href = $this.getAttribute("href");
    var id = $this.getAttribute('data-id');
    var flag = false;
    $.ajax({
        type:"post",
        data:{ id :id, },
        url:"url",
        dataType:"json",
        async: false,
        success:function(data){
            if(!data.code){
                flag = false;
            }else{
                flag = true;
            }            
        },
        error:function(){
            
        }
    });
    return flag;
     
}

 

posted on 2018-10-27 17:59  makeinchina  阅读(1773)  评论(0编辑  收藏  举报

导航