显示表格的title时,如果title太长,则表示成...
<script type="text/javascript">
$(document).ready(function(){
var maxwidth=4;
var th=$("thead").children().children();
$.each(th,function(){
if($(this).text().length>maxwidth){
var len=$(this).text().substring(0,maxwidth);
$(this).text(len+'...');
}
})
})
</script>
$(document).ready(function(){
var maxwidth=4;
var th=$("thead").children().children();
$.each(th,function(){
if($(this).text().length>maxwidth){
var len=$(this).text().substring(0,maxwidth);
$(this).text(len+'...');
}
})
})
</script>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
界面控件DevExtreme v23.1、v23.2盘点 - 增强的TypeScript(Angular、React、Vue)
原創
2024-05-07 11:34:56
Web前端开发常用到的和升职加薪的技能点分别是哪些?
原創
2023-10-10 09:55:05
现在入行web前端开发晚了?数据代表一切
原創
2023-10-10 09:54:58
layui使用serializeJson报Uncaught TypeError: $(...).serializeJson is not a function错
原創
2023-02-08 23:50:08
个人Scrum敏捷开发转型中的技术实践
原創
2022-04-30 12:48:30
springboot集成socketio实现一对一实时聊天
原創
2022-04-30 11:11:09
js组合图片(在图上画二维码)
原創
2022-04-30 10:42:12
Iframe不同层级方法调用和元素获取
原創
2022-04-30 06:30:08
六年来技术变迁的心得体会
原創
2022-04-30 06:03:09
在没有jQuery的情况下查找最近的元素 - Finding closest element without jQuery
fyin1314
2021-12-29 09:18:03
How to post an array of complex objects with JSON, jQuery to ASP.NET MVC Controller?
javail
2021-12-29 09:15:00
如何从 JavaScript 读取脚本标签中的 JSON? - How can I read a JSON in the script-tag from JavaScript?
javail
2021-12-29 09:15:00
event.preventDefault() vs. return false (no jQuery)
javail
2021-12-28 21:15:02
如何使用JQuery获取GET和POST变量? - how to get GET and POST variables with JQuery?
技術盛宴
2021-12-28 09:22:52