这是我的代码:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
<span class='whocares'><div class='box'><span style='font-size:20px;color: #0BB;'>12/26/2012 is the best</span></div><br></span><span class='whocares'><div class='box'><span style='font-size:20px;color: #0BB;'>12-26-2012</span></div><br></span><span class='whocares'><div class='box'><span style='font-size:20px;color: #0BB;'>messa coockcook</span></div><br></span><script>
$(document).ready(function() {
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
$(".whocares:not(:contains('" + month + "/" + day + "/"+ year+"'))").remove();
});
</script>
它适用于JSFiddle,但不适用于我的服务器。在我的服务器上,当我运行它时什么都没有出现。为什么会这样?我做错了什么?
提前致谢!