devxlogo

BASE TARGET for all a HREF documents in frame

BASE TARGET for all a HREF documents in frame

Question:
I want all documents that I open from a child frame to be “target=_top”, but I don’t want to add “Target=” to every HREF tag. Is there a way I can set a base target?

Answer:
Yup. At the top of the page use:

<base target="_top">If you use a different target in any of the links on that page, it willoverride the base target.

devx-admin

Share the Post: