I found my
fiddle only work on Chrome and FF, I don't know why it don't have the ellipsis effect on IE? Hope someone can help on this, it would be better if you can solve it by a CSS way.
BTW, It seems the div has text-overflow:ellipsis effect on both IE and Chrome.
css:
.ellip {
white-space: nowrap;
width: 200px;
overflow: hidden;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
}
html:
<input type="text" class="ellip" value="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz">
<div class="ellip">abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</div>