CRM Dynamics 2015在Web资源中包含JQuery

时间:2015-09-11 14:31:33

标签: jquery dynamics-crm dynamics-crm-online dynamics-crm-2015

我在CRM Dynamics中有一个独立的Web资源,正在加载到iframe中。

JQquery现在作为CRM动态中的默认库包含在内,因此我在我的Web资源中包含以下内容来加载jquery(这是从CRM Dynamics的主页复制而来)。

<script id="/_static/_common/scripts/jquery1.7.2.min.js?ver=-1896091690" src="/_static/_common/scripts/jquery1.7.2.min.js?ver=-1896091690" type="text/javascript"></script>

我想知道的是,如果版本发生变化,是否有更好的方法可以在版本号发生变化时立即中断缓存?

完整的HTML网页资源页面

<html>
    <head>
    <meta charset="utf-8"> 
    <link id="/_common/styles/fonts.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_common/styles/fonts.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_common/styles/global.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_common/styles/global.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_common/styles/theme.css.aspx?lcid=1033&amp;theme=outlook15white&amp;ver=-1896091690" href="/_common/styles/theme.css.aspx?lcid=1033&amp;theme=Outlook15White&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_forms/controls/controls.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_forms/controls/controls.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_controls/notifications/notifications.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_controls/notifications/notifications.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_forms/controls/form.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_forms/controls/form.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">
    <link id="/_common/styles/dialogs.css.aspx?lcid=1033&amp;ver=-1896091690" href="/_common/styles/dialogs.css.aspx?lcid=1033&amp;ver=-1896091690" rel="stylesheet" type="text/css">

    <script id="/_static/_common/scripts/jquery1.7.2.min.js?ver=-1896091690" src="/_static/_common/scripts/jquery1.7.2.min.js?ver=-1896091690" type="text/javascript"></script>
    <script id="/_common/global.ashx?ver=-1896091690" src="/_common/global.ashx?ver=-1896091690" type="text/javascript"></script>
    </head>
    <body>
        body content here
    </body>
</html>

我做了一点挖掘并找到了对这个javascript函数的引用,看起来它用于下载jquery和其他库......

loadScriptAdv('\x2f_static\x2f_common\x2fscripts\x2fjquery1.7.2.min.js\x3fver\x3d-1896091690', '\x2f_static\x2f_common\x2fscripts\x2fjquery1.7.2.min.js\x3fver\x3d-1896091690', false);

1 个答案:

答案 0 :(得分:2)

为jQuery库定义自定义命名空间

教程:

jQuery and jQuery UI with Dynamics CRM 2011 & 2013