为了账号安全,请及时绑定邮箱和手机立即绑定

使用Javascript加载jQuery并使用jQuery

使用Javascript加载jQuery并使用jQuery

慕妹3242003 2019-08-26 17:59:56
使用Javascript加载jQuery并使用jQuery我使用以下命令将jQuery库附加到dom: var script = document.createElement('script');  script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';  script.type = 'text/javascript';  document.getElementsByTagName('head')[0].appendChild(script);但是,当我跑:jQuery(document).ready(function(){...控制台报告错误:Uncaught ReferenceError: jQuery is not defined如何动态加载jQuery以及在dom中使用它?
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 587 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号