开发者

How to differentiate two iframes present on the same jsp

I have two iframes added in a jsp page, with same n开发者_运维问答ame, display name and so on. I am having two different urls which has to be set as target urls in each of these iframes.How can I differentiate these two iframes and set the target urls?


You can use the id attribute which is standard for most html elements (iframe included)


You could give them a different id so that you can grab them by JavaScript. But, actually, the name of the <iframe> is supposed to be unique. Fix that accordingly. This way you can distinguish them by their name in the target.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜