作者WaiTingKuo (:!)
看板Web_Design
标题Re: [问题] 删除span带有删除线的值
时间Sat Nov 16 00:49:00 2013
$('
#extendcode2').find('span').filter(function() {
return $(this).css('text-decoration').indexOf('line-through') >=0;
}).text('')
※ 引述《bluehaerts (5858笨58)》之铭言:
: 目前遇到一个问题,
: 把textarea套用tinymce,
: 可是目前遇到需要把textarea的值取出来当统计资料,
: 可是 里面会牵扯到有删除线的字是属於不需要存入DB的,
: 当我把tinymce.remove 取到字串是下面显示的,
: 我有尝试用JQUERY 把span带有 text-decoration: line-through属性的值删掉,
: 可是没有成功,
: $("#extendcode2").find("[style*='text-decoration: line-through;']").text('');
: 请问这样要用什麽方法解决QQ
: -------------------底下是HTML-------------------------
: <div id="extendcode2" style="background-color: #FFFFFF;">
: <span style="text-decoration: line-through;">1111
: <span style="text-decoration: underline;">55</span>
: </span>
: 55
: <span style="text-decoration: line-through;">5556544</span>
: 65
: <span style="text-decoration: line-through;">46777</span>
: 7
: <span style="font-size: 24pt;">7777777</span>
: 7
: <span style="text-decoration: line-through;">77</span>
: </div>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.43.139.23
※ 编辑: WaiTingKuo 来自: 114.43.139.23 (11/16 00:49)