我如何在提示上做两行或更多行?
我做:
var firstLine = "1st Line";
var secondLine = "2nd Line";
var thirdLine = "3rd Line"
var myTips = firstLine +' '+ secondLine +' '+ thidrLine
我得到"1st Line 2nd Line 3rd Line"
关于我想要的提示
"1st Line
2nd Line
3rd Line"
我怎么能想要它? 我尝试'\ n'和'\ r \ n'而我没有得到理想的结果
答案 0 :(得分:1)
var myTips = firstLine +'<br>'+ secondLine +'<br>'+ thidrLine;