JavaScript:如何在循环中打印多个脚本标记? [英] JavaScript: How do I print multiple script tags in a loop?
本文介绍了JavaScript:如何在循环中打印多个脚本标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是javascript的新手:边做边学..我想做一些像
i'm new to javascript: learning by doing .. i want to do something like
for(var_terms as variable_term){
print( <script
type="text/javascript"
src="http://gdata.youtube.com/feeds/api/videos?q=variable_term&callback=showMyVideos">
</script> )
}
在客户端..我基本上希望 showMyVideos
应用于来自数组/数据库/文件的多个搜索查询,而不仅仅是一个预定的查询。
on the client side..i basically want showMyVideos
applied to multiple search queries from an array/database/file and not just one predetermined query.
谢谢
推荐答案
请看一下 http://jquery.com/ 它将为您提供帮助,jquery页面上有大量文档
please take a look at http://jquery.com/ it will help you with this, there is extensive documentation on the jquery page
这篇关于JavaScript:如何在循环中打印多个脚本标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文