在Kotlin 页面中,HTML-Builder我可以看到下面的代码,如何在简单的 .tk 文件中使用它?如何开始?
val data = mapOf(1 to "one", 2 to "two")
createHTML().table {
for ((num, string) in data) {
Iterate over data
tr {
Functions to create HTML tags
td { +"$num" }
td { +string }
}
}
}
Run Code Online (Sandbox Code Playgroud)