开发者

JQuery loop through <link> and <script>

I am trying 开发者_如何学Pythonto loop through the elements link and script tag

$("script").each(function () {
 alert("Test");
});

The code works for img tag but does work for the above 2?


Try this:

$("script, link").each(function () {
   alert($(this).attr('type')); //:)
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜