<!DOCTYPE html><html><head> <title>ceshi </title> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { const container = document.getElementById('container') const child = $('<div>hello world</div>') container.appendChild(child) }) </script></head><body> <div id="container"></div></body></html>报错如下:Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.jquery生成的不是node对象,那如何从jquery生成的对象中取 node对象呢?
添加回答
举报
0/150
提交
取消