acpp
V2EX  ›  问与答

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

  •  
  •   acpp · Nov 25, 2013 · 2880 views
    This topic created in 4730 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
    catoncat
    catoncat
    Nov 25, 2013
    1
    直接去掉if不就完了
    acpp
    acpp
    OP
    Nov 25, 2013
    2
    哈,我是该夸你呢@crs0910 还是骂我自己呢
    Glow
    Glow
    Nov 27, 2013
    3
    @acpp 你是不是又熬夜写代码了?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1256 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:32 · PVG 00:32 · LAX 08:32 · JFK 11:32
    ♥ Do have faith in what you're doing.