faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 3 people (100%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

How do I pass the page title (document.title) into a url on the same page?

Apr 7th, 2008 23:44
ha mo, Ronald Woods, David Kaye,


If you want to include the page title as a part of the URL, you could 
do something like this: 
<html>
<head>
<title>Test page</title>
</head>
<body>
Hey: <script language="javascript"><!--
  var sURL = 'link.asp?referertitle='+document.title;
  document.write('<'+'a href="'+sURL+'">ASDF</a>');
--></script>
</body>
</html>
But I'm not sure that's what you're after...
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com