<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery文本溢出</title>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.textEllipsis.js"></script>
<script>
$(function(){
$("p").textEllipsis({line:2, ellipsis: "......"});
});
</script>
<style type="text/css">
p { width:200px;}
</style>
</head>
<body>
<p>
this is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a testthis is a test
</p>
</body>
</html>