jquery检测元素是否存在的实例代码_javascript技巧
来源:懂视网
责编:小采
时间:2020-11-27 21:15:59
jquery检测元素是否存在的实例代码_javascript技巧
jquery检测元素是否存在的实例代码_javascript技巧:if ($('#myDiv).length) { // your code } Simple, but not obvious.
导读jquery检测元素是否存在的实例代码_javascript技巧:if ($('#myDiv).length) { // your code } Simple, but not obvious.

if ($('#myDiv).length) {
// your code
}
Simple, but not obvious.
jquery检测元素是否存在的实例代码_javascript技巧
jquery检测元素是否存在的实例代码_javascript技巧:if ($('#myDiv).length) { // your code } Simple, but not obvious.