我一点也不擅长jQuery,所以请有人帮帮我。我需要在名称和电子邮件地址之间添加一个行间隔。
现在,输出是:
消息hello@hello.net。
我需要的是:
消息 hello@hello.net
这是密码
var tabs = [
new Tab({
name: "tab1",
text: "Messages hello@hello.net"
})
]发布于 2014-02-25 14:30:45
使用\n创建新行
var tabs = [
new Tab({
name: "tab1",
text: "Messages\nhello@hello.net"
})]发布于 2014-02-25 14:43:49
“文本”将在HTML中显示吗?
也许加个br标签会对你有好处。
var tabs = [
new Tab({
name: "tab1",
text: "Messages<br/>hello@hello.net"
})]一种更好的方法可能是将文本分割成不同的部分,这种方式更适合于样式设计,等等:
var tabs = [
new Tab({
name: "tab1",
prefix: "Messages",
text: "hello@hello.net"
})]这是可能的,只有当你有控制什么发生在‘标签’。
https://stackoverflow.com/questions/22017160
复制相似问题