发生短路时未闭合的字符串错误

这个问题在这里已经有了答案:

  • 在JavaScript中创建多行字符串34个答案

  • 做这样的事情

    $this.append(
                '<a href="' + slideLink + '"' + slideTarget + '>
                <span class="slide-time-date"></span>
                <div class="slide-overlay-text slide-overlay-text-mobile"' + slideColour + '>
        <span>' + slideOverlaytext + '</span>
        </div>
        <div class="slide-overlay-text slide-overlay-text-tablet"' + slideColour + '>
        <span>' + slideOverlaytext + '</span>
        </div>
        <div class="slide-overlay-text slide-overlay-text-desktop"' + slideColour + '>
        <span>' + slideOverlaytext + '</span>
        </div>
        <img src="' + slideImg + '" alt="' + slideTitle + '" />
                </a>'
        );
    
    链接地址: http://www.djcxy.com/p/30453.html

    上一篇: Unclosed string error when linting

    下一篇: String that contains line breaks