我做错什么了?当我运行此代码时,没有显示任何内容。
JavaScript 代码:
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
$(".whocares:not(:contains('' + month + '/' + day + '/'+ year + ''))").remove();
和 HTML:
<div class="whocares">hi</div> <div class="whocares">12/26/2012 i like cake two</div> <div class="whocares">hi</div>