if ($('#myDiv).length) { // your code } Simple, but not obvious. 相关文章: 2022-12-23 2022-12-23 2022-12-23 2021-10-11 2022-12-23 2022-12-23 2022-02-10 2021-12-27