外链Jquery.js库载入失败时引用本地

当外链JQuery失败时,从本地网站上引用JQuery,可以把以下代码放置<head></head>之间,但是必须放在外链如

 

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

的后面。

 

以下是放置代码

<code>
    <script type="text/javascript">   
    //<![CDATA[   
    //判断是否成功将Jquery库引入,如果没有成功引入则引入本地Jquery库   
    if (typeof jQuery == 'undefined') {document.write("<script type=\"text/javascript\" src=\"http://os.yefengs.com/wp-content/themes/yefengs/js/jquery.min.js\"><\/script>");}   
    //]]>   
    </script>  
</code>

One thought on “外链Jquery.js库载入失败时引用本地
  1. FRaSNI 2023/11/28 17:41  0

    Due to diagnostic improvements and better knowledge of the disease among physicians, the prevalence of PXE has changed along the years, and, at present, it is estimated to be around 1 25 propecia amazon axitinib in metastatic renal cell carcinoma patients who have failed prior sunitinib therapy in the US

Comments are closed.

添加一条新回复 回到顶部

亲爱的,主人已经关闭了这篇文章的评论 。