Link.target

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							link.target

Description

The target property of the Link object represents the name of the window in which the URL is to be displayed.

Example

Listing 7.377 shows how the target property is used. When the button is clicked, the showtarget() function displays the target value of the link.

Listing 7.377 Example of the target Property
<html>
<head>
<title> Using the target property of the Link object</title>
</head>
<body>

<script language="JavaScript">
<!--Hide

// displays the name of the window in which the link will be displayed.
function showtarget(){
     document.form1.text1.value = document.links[0].target;
}
// End Hide --->
</script>
							 Click the button to see the ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.