Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing HTML Page Title in Query String?

Status
Not open for further replies.

Kenny100

Technical User
Feb 6, 2001
72
NZ
Hi Folks

Is there anyway using Javascript (or other technique) to access the title of the current HTML page i.e. the text between the <title> tags?

I'd like to access this value and then pass it in the Query String. Can this be done?

Cheers,
Kenny.
 
Code:
<html>
<head>
<title>This is the title of this document.</title>
</head>
<body>
<button onclick="alert([b]document.title[/b]);">What is the title of this document?</button>
</body>
</html>

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Access title through document.title

When do you want it appended?

--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top