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')); //:)
});
精彩评论