用Scala实现简单的Web和API服务器(23)

.then(json => {

if (json.success) {

messageList.innerHTML = json.txt

msgInput.valuehttp://www.veick.cn/news/= ""

errorDiv.innerText = ""

} else {

errorDiv.innerText = json.txt

}

})

}

"""))

),

body(

div(cls := "container")(

h1("Scala Chat!"),

hr,

div(id := "messageList")(

messageList

),

hr,

推荐阅读