这是我的代码输出,将数据传递给控制台:
console.log('
FUN, FRIENDLY, * New PRIVATE PARTY ROOM with stage, 70" Satellite TV, comfortable lounge seating
Exciting Bachelor Parties, Unique Surprise Birthday Parties, Divorce, Retirement....You Own IT!
Party includes: 90 Minutes Open Bar, Dedicated Waitress, complimentary Dance of choice for the guest of honor, '.trim());
我的结果是:SyntaxError: unterminated string literal.
我知道这是一个在javascript中打破新行的问题,我需要使用,\但这是动态数据,如下所示:
var b = '<xsl:value-of select="./description"/>'; <--- the output above gets assigned here
Run Code Online (Sandbox Code Playgroud)
那么,我该如何解决这个问题呢?应用程序未在日志上输出此文本.其显示空白我应该更换\n用\?
不太确定解决方案.
我有以下代码:
$epoc = $rs->{'lastlogin'};
$date = localtime($epoc);
Run Code Online (Sandbox Code Playgroud)
lastlogin 是一个Unix时间戳.
输出如下: Tue Jul 5 13:46:43 2016
我在找Tue Jul 5 2016 13:46:43.如您所见,年份移至左侧一个位置.
我也是一个新手,所以我从这里尝试了一些匹配:Perl中的日期和时间函数,但我找不到来自Unix时间戳的日期格式匹配.