V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
acpp
V2EX  ›  问与答

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

  •  
  •   acpp · 2013-11-25 01:23:17 +08:00 · 2147 次点击
    这是一个创建于 3841 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 条回复    1970-01-01 08:00:00 +08:00
    crs0910
        1
    crs0910  
       2013-11-25 01:59:17 +08:00
    直接去掉if不就完了
    acpp
        2
    acpp  
    OP
       2013-11-25 02:08:51 +08:00
    哈,我是该夸你呢@crs0910 还是骂我自己呢
    Glow
        3
    Glow  
       2013-11-27 13:32:32 +08:00
    @acpp 你是不是又熬夜写代码了?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   942 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:31 · PVG 06:31 · LAX 15:31 · JFK 18:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.