- function checkJquery() {
- if(!(window.jQuery)) {
- var s = document.createElement('script');
- s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
- s.setAttribute('type', 'text/javascript');
- document.getElementsByTagName('head')[0].appendChild(s);
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/060820134990.html
来源: http://www.codesnippet.cn/detail/060820134990.html