V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
acpp
V2EX  ›  问与答

有没睡觉的前端来问个js的问题

  •  
  •   acpp · Nov 25, 2013 · 2615 views
    This topic created in 4545 days ago, the information mentioned may be changed or developed.
    if(thisfile == '/gongchenganli/20131122/428.html'){
    $('.panel img').each(function(i){
    var src = $(this).attr("src");
    var img = new Image();
    img.src = src;
    if(img.onload){
    tht = $(this).height();
    if(tht < 460){
    $(this).css({'margin-top':(460-tht)/2+'px'})
    }
    }
    })


    /gongchenganli/20131122/428.html 如果要改成任意目录 任意文件名 该怎么写
    3 replies    1970-01-01 08:00:00 +08:00
    crs0910
        1
    crs0910  
       Nov 25, 2013
    直接去掉if不就完了
    acpp
        2
    acpp  
    OP
       Nov 25, 2013
    哈,我是该夸你呢@crs0910 还是骂我自己呢
    Glow
        3
    Glow  
       Nov 27, 2013
    @acpp 你是不是又熬夜写代码了?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   782 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 19:34 · PVG 03:34 · LAX 12:34 · JFK 15:34
    ♥ Do have faith in what you're doing.