提高jquery加载速率(有cdn就加载,没有就加载本地)
<!-- Adds google cdn reference --> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <!-- Cdn fail refers to local library --> <script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='{%$rootpath%}js/jquery-3.2.1.min.js' type='text/javascript'%3E%3C/script%3E")); } </script>