JQ 插入元素

xiaoxiao2021-02-28  7

代码:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="box"> 文件 </div> </body> </html> <script src="https://code.jquery.com/jquery-3.3.1.min.js "></script> <script> $('#box').after('<div>编辑</div>'); $('#box').before('<div>视图</div>') </script>
转载请注明原文地址: https://www.6miu.com/read-2400011.html

最新回复(0)