jquery 判断元素是否存在

if ($("#控件ID").length > 0){
// 需要执行的代码
}
posted @ 2013-10-15 11:12  淡 淡  阅读(9)  评论(0)    收藏  举报