![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jquery
田野啸风
双手敲出简单的快乐
展开
-
jquery 如何在html中去掉标签,但保留原标签内的内容
目标:删除class="aaa"的标签,并保留原标签的内容。 let my_html = $('.aaa).html(); $('.aaa').before(my_html); $('.aaa').remove();解决思路:先复制一份原有内容,放在待删标签前,再将原标签及原内容删除。...原创 2019-11-06 09:07:07 · 1619 阅读 · 0 评论 -
/glyphicons-halflings-regular.woff2 net::ERR_ABORTED 404 (Not Found) 报错及处理方法
问题:运行正常,但控制台报错: ......./glyphicons-halflings-regular.woff2 net::ERR_ABORTED 404 (Not Found) jquery-1.11.1.min.js:3 ......./glyphicons-halflings-regular.woff net::ERR_ABORTED 40...原创 2019-10-23 10:47:41 · 1595 阅读 · 0 评论 -
如何批量删除class名为xxx的span标签,并保留里面的内容
目标:批量删除class为“.my_find”的span标签, 但保留原有内容: var my_number = $(".my_find").length; for(var i=0 ;i<my_number; i++){ var html = $(".my_find").eq(0).html(); $(".my_find").eq(0).bef...原创 2019-10-12 15:04:34 · 1093 阅读 · 0 评论 -
jquery实时监控屏幕宽度
// 方法1$(window).resize(function(){if( $(window).width() < 1330 ) { // 屏宽1330触发$(".show_123").css(‘display’,‘none’); // 隐去一部分}else{$(".show_123").css(‘display’,’’);}});//方法2window.οn...原创 2019-08-09 15:49:22 · 4931 阅读 · 0 评论