https://jsfiddle.net/qqwoxo5L/
控制台报错
(index):94 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
p 确实是 jQuery 构造出来的啊!为什么会报错呢?
大家能帮我看下这是为什么吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
已经找到原因了。
每次调用$,会重新执行jQuery构造函数,导致每个实例指向了不同的构造函数,把jQuery这个构造函数放到$外面就可以了。