Links in iframe will open on the same window by default, but specifying target on base tag we can make all links inside iframe to open in same / new window.

In normal cases setting  target=_parent  target=_blank  will make links open on same / new window. It's just not elegant when you have more links in iframe content. So we can make use of <base> tag for this purpose.

By setting target attribute to _parent / _blank we can make all links to open in same / new window in iframe.

Example:
<html>
<head>
<base target='_parent' />
</head>
<body>
<a href='http://webdevelopmentscripts.com'>web development scripts</a>
</body>
</html>

Links in iframe will open on the same window by default, but specifying target on base tag we can make all links inside iframe to open in same / new window.
 


Comments (0)
Leave a Comment

loader Posting your comment...