Bad escaping of EOL

后端 未结 2 1336
独厮守ぢ
独厮守ぢ 2021-02-18 21:26

I am trying to work with a simple WYSIWYG editor. JSLint is saying it has \"Bad escaping of EOL\". Since I am new to javascript I am having a hard time figuring out what it mean

2条回答
  •  不思量自难忘°
    2021-02-18 22:09

    JS didn't support end-of-line escaping with \ until ES5 - you can use multiple strings with a + operator instead, i.e.

    "string 1" +
    "string 2" +
    "string 3"
    

    Re: your other questions:

    1. Use parseInt(n, 10) to force base (aka radix) 10, i.e. decimal

    2. Use iframe.style.height instead of iframe.style['height']

提交回复
热议问题