判断input或者div.span等标签是否存在

//用jQuery检查某个元素在网页上是否存在时,应该根据获取元素的长度来判断,代码如下
if($("#email"+i).length > 0){//判断input是否存在
    //input 存在 执行区域

}
原文地址:https://www.cnblogs.com/richard-ju/p/L2019001.html