dawnzhu
V2EX  ›  问与答

js 语法问题,求大佬指导

  •  
  •   dawnzhu · Jun 9, 2020 · 1958 views
    This topic created in 2215 days ago, the information mentioned may be changed or developed.
      var list_mode_html =
                            '<div class="col-md-12 col-xs-12 no-padding product-holder product-holder-itemlist">' +
                                '<a href="/' + info.lang + '/home/product_list/product_detail.html?ic=#item_family#">' +
                                    '<div class=" col-md-4 col-xs-4">' +
                                        '<div class="product-pic-holder">' +
                                            '<img class="product-pic" src="#item_image#">' +
                                        '</div>' +
                                    '</div>' 
    

    #item_family# 在字符串中 # # 是什么意思呢

    6 replies    2020-06-09 14:33:11 +08:00
    crazybinggan
        1
    crazybinggan  
       Jun 9, 2020
    看着像是给后端做的标记,用于正则替换?
    luzemin
        2
    luzemin  
       Jun 9, 2020
    目测是自定义的占位符,相当于 vue 中的{{item_image}}
    dawnzhu
        3
    dawnzhu  
    OP
       Jun 9, 2020
    @crazybinggan 大概明白什么意思了,谢谢
    dawnzhu
        4
    dawnzhu  
    OP
       Jun 9, 2020
    @luzemin 应该是类似的意思了,谢谢指导
    prof
        5
    prof  
       Jun 9, 2020
    栋哥?
    dawnzhu
        6
    dawnzhu  
    OP
       Jun 9, 2020
    @prof 哈哈,不是,栋哥不聊技术
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5592 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 05:50 · PVG 13:50 · LAX 22:50 · JFK 01:50
    ♥ Do have faith in what you're doing.