html - Javascript: Remove last occurence of comma in span tag -


I object key result > And separated them with a comma, but I can not remove the last time of comma in the text.

  Results: & lt; Span class = "result" & gt; & Lt; / Span & gt;  

Javascript:

(key in obj) {$ ("result"). Attached (key + ","); }

Therefore, for example, instead of 1,2,3, it would be 1,2,3

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -