原型中 JQuery 的 getScript 等价物 [英] JQuery's getScript equivalent in Prototype
本文介绍了原型中 JQuery 的 getScript 等价物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Prototype 中是否有一些等效于 jQuery 的 getScript ?
Is there some equivalent to jQuery's getScript in Prototype ?
推荐答案
var head;
var script;
head = $$('head')[0];
if (head)
{
script = new Element('script', { type: 'text/javascript', src: 'dynamic.js' });
head.appendChild(script);
}
这篇关于原型中 JQuery 的 getScript 等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文