以前常利用c#的String.fomat來達到我想要的格式輸出
最近要用js來將某些資料更新到前端畫面,就寫了一下,不過還並不完整
String.Format("{0}, Javascript! {1}.", "Hi", "This is test"); //Hi, Javascript! This is test.
String.Format("{greeting}, {name}! {something}.",
{
greeting:"Hi",
name:"Javascript",
something:"This is test"
});//Hi, Javascript! This is test.
沒有留言:
張貼留言