如何在ASP.Net项目中包含jQuery? [英] How to include jQuery in ASP.Net project?

查看:151
本文介绍了如何在ASP.Net项目中包含jQuery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读到Microsoft现在捆绑带有Visual Studio的jQuery .然后,如何在我的ASP.Net项目中包含" jQuery源?

I've read that Microsoft now bundles jQuery with Visual Studio. How then do I "include" the jQuery source in my ASP.Net project?

推荐答案

您可以使用以下方法直接在页面/母版页等中包含脚本文件:

You can include the script file directly in your page/master page, etc using:

 <script type="text/javascript" src="/scripts/jquery.min.js"></script> 

我们使用诸如Google或Microsoft之类的Content Delivery网络:

Us use a Content Delivery network like Google or Microsoft:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 

或:

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script>     

这篇关于如何在ASP.Net项目中包含jQuery?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆