I:jQuery的內爆/與自定義字符加入字符串(元素)(連字符)
$(this).parents("tr:first").children("td").children("span");
當我做到這一點:
$(this).parents("tr:first").children("td").children("span").text();
跨度中的文本(比如a和b)連接在一起(ab),這就是我想要的
但是現在我想通過在中間插入連字符( - b) 我已經嘗試這樣做,但是,這並不工作:
$(this).parents("tr:first").children("td").children("span").join(" - ");
加入用於與陣列elements.you不能直接與一個變量使用它。 – Vivek 2011-02-25 12:05:08
ah,+1 ......... – Michel 2011-02-25 15:19:49