當使用此代碼:我需要添加什麼代碼才能使該javascript在文本結尾自動添加3個點?
<script>
$(document).ready(function()
{
$.getJSON("http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?", function(data) {
if(data[0].text.length > 107)
$(".show_tweet").html(data[0].text.substring(0,107));
else
$(".show_tweet").html(data[0].text);
});
});
</script>
<div class='show_tweet'></div>
我需要什麼樣的代碼添加,使其增加了3個點「...」在文本的自動結束了嗎?
這與JSON無關。 –