<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>JQuery on 腾图工作室,威远博客,威远工作室,Ease</title>
    <link>/tags/jquery/</link>
    <description>Recent content in JQuery on 腾图工作室,威远博客,威远工作室,Ease</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 31 May 2020 17:42:26 +0800</lastBuildDate>
    <atom:link href="/tags/jquery/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Javascript中加载jQuery及其它脚本、CSS等</title>
      <link>/it/2020/053117-js/</link>
      <pubDate>Sun, 31 May 2020 17:42:26 +0800</pubDate>
      <guid>/it/2020/053117-js/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;//引入css&#xA;var head = document.getElementsByTagName(&amp;#39;head&amp;#39;)[0];&#xA;var link = document.createElement(&amp;#39;link&amp;#39;);&#xA;link.href = baseUrl+&amp;#39;/css/style.css&amp;#39;;&#xA;link.rel = &amp;#39;stylesheet&amp;#39;;&#xA;link.type = &amp;#39;text/css&amp;#39;;&#xA;head.appendChild(link);&#xA;&#xA;//引入js&#xA;//var head = document.getElementsByTagName(&amp;#39;head&amp;#39;)[0];&#xA;var script = document.createElement(&amp;#39;script&amp;#39;);&#xA;script.src = &amp;#39;http://libs.baidu.com/jquery/1.8.3/jquery.min.js&amp;#39;;&#xA;script.type = &amp;#39;text/javascript&amp;#39;;&#xA;head.appendChild(script);&#xA;&#xA;//载入jquery后，再载入其它js&#xA;//若不等待，直接载入其它js，可能存在jquery还未载入，其它二次开发的js就不能正常使用。&#xA;waitQuery = window.setInterval(function(){ &#xA;    if(typeof jQuery != &amp;#39;undefined&amp;#39;){&#xA;        window.clearInterval(waitQuery);&#xA;        $.getScript(baseUrl+&amp;#39;/js/juqery-translucent-min.js&amp;#39;,function(){&#xA;            //建立窗口            &#xA;            $(&amp;#34;body&amp;#34;).translucent({&#xA;                target:&amp;#34;serviceWin&amp;#34;,&#xA;                width:w,&#xA;                textHtml:&amp;#34;&amp;lt;div&amp;gt;这是一个新建的弹窗！&amp;lt;/div&amp;gt;&amp;#34;,&#xA;                titleText:&amp;#34;弹窗标题内容&amp;#34;&#xA;            });&#xA;&#xA;            var div = document.getElementsByClassName(&amp;#34;translucent-title&amp;#34;)[0];&#xA;            console.log(div.innerHTML);&#xA;&#xA;        });  &#xA;    }  &#xA; },100);&#xA;&#xA;//js中动态加载div&#xA;var div = document.createElement(&amp;#34;div&amp;#34;);&#xA;div.innerHTML = &amp;#34;微客服网页版开发中...&amp;#34;;&#xA;div.setAttribute(&amp;#34;id&amp;#34;,&amp;#34;fl&amp;#34;);&#xA;div.style.width=w+&amp;#34;px&amp;#34;;&#xA;div.style.height=h+&amp;#34;px&amp;#34;;&#xA;div.style.top=&amp;#34;-1000px&amp;#34;;&#xA;div.style.background=&amp;#34;#eee&amp;#34;;&#xA;div.style.position=&amp;#34;fixed&amp;#34;;&#xA;document.body.appendChild(div); &#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
