1、解决方法:根据获取到的元素的长度来判断
2、实例:
if($("#content").length>0){ //do something }
3、非法写法
if($("#content")){ //do something }