Jquery 版本冲突 Web 主机

Jquery versions conflict web host

本文关键字:主机 Web 冲突 版本 Jquery      更新时间:2023-09-26

我有这个代码,我需要在我的网页中工作,它实际上可以离线工作,但是当我将其上传到mi网页时它不起作用。 我已经进行了几次测试,我知道它是两个版本的jquery的用途,但这些是日历和get指令所必需的,这对于程序的使用非常重要。 第一部分是日历工作,jQuery 版本 1.12.0 用于 get 指令。

一些想法?

网络平台 one.com

   <!DOCTYPE html >

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<script>
$(document).ready(function() {
   $("#datepicker").datepicker();
 });

function revtemp() {
$.get("https://docs.google.com/spreadsheets/d/1CG2a49fTJyXxk9CUFNpX4dueGGhxfxmtTZkN5wj0U80/gviz/tq?tqx=out:html&tq=select+K", function(data){
da=data;      
alert(da);   
        },"text");
}

window.setInterval(revtemp,5000);
 </script>

</head>
<body>
<form action="">
  <label> Seleccionar Fecha:</label>
  <input type="text" name="datepicker" id="datepicker" readonly="readonly" size="12" />
</form>
</body>
</html>

你可以通过这种方式加载 Jquery 到一个在页眉上,另一个在页脚上。

  • 或者,您可以验证页眉 jQuery 是否已加载到页脚部分中。

    if ((typeof jQuery == 'undefined') ||(jQuery.fn.jquery != "1.9.1")){ document.write(unescape("%3Cscript src='/Responsive/Scripts/jquery-1.9.1.min.js' type='text/javascript'%3E%3C/script%3E")); }