If you set a to 0, and b to the length that you want it to be, then the string will be truncated to that length.
This could be used much like:
<script type = 'text/javascript'>
var length = 30;
function cut(x, y) { return(x.substr(0, y) + "..."); }
for(i = 0, a = get('a', 'tag'); i < a.length; i++) if(a[i].innerHTML.length > length) a[i].innerHTML = cut(a[i].innerHTML, length); </script>
The cut function will truncate the string and add the dots for you, to a length specified through the variable length. I haven't tested this, but it should work, any problems, let me know!
Ok... So when I said all links it did just that XD and it really works, however I see a few instances where we should probably tell it not to shorten...